Electronic device system and control method in electronic device system in which a second device is controlled using a command from a first device

ABSTRACT

A printer system  100  includes a printer  10 , a winding device  30 , a color meter  41 , and a color measurement driving device  80 . A host communication section  81  of the printer 10 is communicably connected to device communication sections  82  to  84  of the devices  30, 41 , and  80 . In the device communication sections  82  and  84  of the devices  30  and  80 , a printer class is set as a device class. Print data that includes commands for control the devices  30  and  80  is transmitted from a second printer driver  89  of the printer  10  to the devices  30  and  80 . The printer  10  and the devices  30  and  80  are provided with an ESC/P analyzing section that can analyze print data.

BACKGROUND

1. Technical Field

The present invention relates to an electronic device system thatincludes a first device, which is controlled on the basis of controldata in a specific command format transmitted from a driver in a hostapparatus, and a second device, which is communicable with the firstdevice, and a control method of an electronic device system.

2. Related Art

A printing system is known that includes a printer, which receives printdata from a host apparatus and performs printing on the basis of printdata.

The printer includes a color measuring device that prints a color patchon a recording sheet and performs color measurement for the printedcolor patch, such that printing can be performed with colors suitablefor a desired color space (for example, JP-A-2001-324387). The colormeasurement result of the color measuring device is analyzed, forexample, by a printer driver in the host apparatus and is reflected in asubsequent print condition.

Preferably, control of an optional device, such as a color measuringdevice or the like, in the printer is executed together with printingcontrol of the printer on the basis of print data to be transmitted fromthe host apparatus to the printer.

When an instruction (control data) from the host apparatus istransmitted to the optional device through the printer, it is necessaryto develop and manufacture an exclusive-use driver for controlling theoptional device, and to install the exclusive-use driver in the hostapparatus, together with the printer driver. In this case, it isnecessary to newly provide an exclusive-use communication section forcommunication when control data is transmitted from the printer to theoptional device. With respect to the optional device, it is alsonecessary to develop and manufacture an exclusive-use command analyzingsection for analyzing control data (command) for the optional device.

SUMMARY

An advantage of some aspects of the invention is that it provides anelectronic device system that can comparatively simply control a seconddevice by using at least part of an existing driver or command analyzingsection used to control a first device, without developing andmanufacturing an exclusive-use driver or an exclusive-use commandanalyzing section, and a control method of the electronic device system.

According to an aspect of the invention, an electronic device systemincludes a first device that belongs to a specific class and executes afirst processing, and a second device that does not belong to thespecific class and executes a second processing. The first deviceincludes a data acquiring unit acquiring a command in a specific dataformat, which is being analyzable by the device of the specific class, afirst control unit executing the first processing on the basis of thecommand, a device driver having a command generating unit, whichconverts a parameter in the command to generate a command to betransmitted to the second device, a first analyzing unit analyzing thecommand and transmitting the command to the first control unit or thedevice driver, and a host communication section transmitting a commandincluding the converted parameter to the second device on the basis of aresponse from the second device indicating that the second devicebelongs to the specific class. The second device includes a devicecommunication section in which the specific class is set as a class thatshould respond, a second analyzing unit capable of analyzing the commandincluding the converted parameter, and a second control unit executingthe second processing on the basis of the command including theconverted parameter.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will be described with reference to the accompanyingdrawings, wherein like numbers reference like elements.

FIG. 1 is a schematic perspective view of a printer system according toa first embodiment of the invention.

FIG. 2 is a schematic side sectional view of a printer system.

FIG. 3 is a perspective view of a color measuring device.

FIG. 4 is a block diagram concerning main communication of a printingsystem.

FIG. 5 is a block diagram showing the electrical configuration of aprinting system.

FIG. 6 is a schematic view showing a layered structure of acommunication stack.

FIG. 7 is a data structure diagram showing ESC/P control data (printdata).

FIGS. 8A to 8D are data structure diagrams illustrating commandgeneration.

FIG. 9 is a schematic view showing a setup screen for color measurement.

FIGS. 10A and 10B are schematic side views illustrating measurement of aposition of a roll paper.

FIG. 11 is a schematic plan view showing a part of a color measuringdevice.

FIGS. 12A and 12B are schematic plan views showing scan colormeasurement and spot color measurement, respectively.

FIG. 13 is a flowchart showing control contents of an ESC/P analyzingsection and a second printer driver of a printer.

FIG. 14 is a transaction diagram showing a color measurement processing.

FIG. 15 is a block diagram concerning main communication of a printingsystem.

FIG. 16 is a block diagram showing the electrical configuration of aprinting system.

FIG. 17 is a schematic view showing a setup screen for colormeasurement.

FIG. 18 is a data structure diagram showing print job data.

FIG. 19 is a block diagram showing the configuration of a main controlsection in a printer driver.

FIG. 20 is a block diagram showing the configuration of a label printposition calculating section.

FIGS. 21A and 21B are schematic views illustrating a method ofgenerating label print data.

FIGS. 22A to 22C are schematic views illustrating printing for colormeasurement, color measurement, and label print, respectively.

FIG. 23 is a flowchart showing a processing of a printer driver.

FIG. 24 is a flowchart showing a processing of a printer.

FIG. 25 is a transaction diagram showing a processing when colormeasurement and label print are performed in a printing system.

DESCRIPTION OF EXEMPLARY EMBODIMENTS First Embodiment

Hereinafter, a first embodiment of the invention will be described withreference to FIGS. 1 to 14. FIG. 1 is a perspective view of an ink jettype printer with an exterior case detached. FIG. 2 is a side sectionalview of essential parts of the printer.

A printer system 100 serving as an electronic device system shown inFIG. 1 includes a printer 10 that is a large ink jet printer capable ofrecording on a large sheet, a winding device 30 for winding roll paper Rprinted by the printer 10, and a color measuring device 40 measuring acolor of a color patch on the roll paper R printed by the printer 10. Asa sheet serving as a target (recording medium), single sheets of paperas well as the roll paper R are used.

As shown in FIG. 1, the printer 10 is provided with a roll paper holder13 at a side of a back portion and at an upper portion of a printer mainbody 12 supported by a stand 11. The roll paper holder 13 includes aspindle capable of holding the roll paper R, and a pair of flange-shapedroll paper press members. A cartridge holder 15 is provided at a portionof the printer main body 12 toward a left end, which is an example of afront surface. The cartridge holder 15 has a plurality of cartridgeslots in which ink cartridges 14 of respective colors are individuallyaccommodated.

The printer main body 12 is provided with a feed guide plate 16 to beinclined at approximately 60° downward toward the front side. The feedguide plate 16 guides the roll paper R held by the roll paper holder 13downward toward a front portion serving as a transport direction A. Acarriage 17 is provided in a transport path of the roll paper R. Thecarriage 17 is guided by a guide member 18, which is provided to extendalong a widthwise direction of the printer main body 12, andreciprocates in a main scanning direction B.

As shown in FIG. 2, a recording head 19 is held by the carriage 17, anda platen 20 is provided at an obliquely downward position from therecording head 19 with a gap. The roll paper R that passes between therecording head 19 and the platen 20 is fed by rotation of a transportroller 21 having a pair of nip rollers on an upstream side of thetransport direction, and a paper discharge roller 22 having a pair ofnip rollers on a downstream side of the transport direction. Inksupplied from the ink cartridges 14 of the respective colorsaccommodated in the cartridge holder 15 is ejected from nozzles of therecording head 19 that is moving in the main scanning direction B,together with the carriage 17, and printing is performed on a portion ofthe roll paper R on the platen 20. Subsequently, the paper feedoperation of the roll paper R and the recording operation by therecording head 19 are substantially alternately executed (bothoperations may be partially performed simultaneously), printing on theroll paper R is performed. Similarly, in the case of single sheets ofpaper, ink droplets are ejected from the recording head 19 onto thesingle sheets fed from a paper feeder (not shown) one by one. In thefollowing description, a case in which paper to be used is the rollpaper R will be described.

As shown in FIG. 1, the color measuring device 40 is provided on adownstream side in the transport direction A of the printer 10 from thecarriage 17, and the winding device 30 is provided on a downstream sidefrom the color measuring device 40. The winding device 30 includes awinding rotary shaft (not shown), a pair of flange-shaped roll paperpress members 31 capable of being integrally rotatably attached to thewinding rotary shaft, and a winding motor 32 for rotating the windingrotary shaft. The roll paper R after printing is wound around a pipemember (not shown) that rotates together with the winding rotary shaftof the winding device 30.

Next, the color measuring device 40 will be specifically described withreference to the drawing. FIG. 3 is a perspective view showing the mainstructure of the color measuring device.

The color measuring device 40 includes a color meter holder 42 holding acolor meter 41, a carriage reciprocating unit 43, a press member 44, arotation shift unit 45, and a white tile 47 and a tile holder 48constituting a calibration unit 46 as a single body.

The color meter 41 is a measuring instrument that irradiates light ontoa pattern for color measurement (hereinafter, referred to as “colorpatch CP”) recorded on the roll paper R, and measures color informationon the basis of light reflected by the color patch CP to obtain acorrection value for color correction. As shown in FIG. 3, the colormeter 41 has an angular boxlike exterior shape. The color meter 41 isprovided with a socket 50 for connection of a connector wire 49. In thisembodiment, a USB (Universal Serial Bus) cable and a USB connector areused as the connector wire 49 and the socket 50, respectively. This isbecause the plug-and-play function of USB communication ensureselectrical connection of the color meter 41 any time when the printersystem 100 is powered on, such that the color meter 41 performs colormeasurement.

The color information may include color information based on the Labcolor mode in which a color value is defined by white balance,chromaticity, and brightness (L*). The monitor uses the RGB color mode,and the printer 10 uses a CMYK color mode. For this reason, the colorinformation based on the Lab color mode measured by the color meter 41may be converted into the RGB color mode or the CMYK color mode, and thecorrection value for the monitor or the printer 10 may be calculated andapplied.

The color meter holder 42 in which the color meter 41 is accommodated soas to be attached to or detached from the color meter holder 42 througha one-touch operation is rotatably connected to a follow-up mechanism 51through a parallel ring mechanism 53 having four rings 52 (in FIG. 3,only two rings are shown). For this reason, if the color meter holder 42rotates through the parallel ring mechanism 53, the color meter 41 heldby the color meter holder 42 can be changed in posture. Four runningwheels 54 formed by, for example, bearings are attached to the lowersurface of the color meter holder 42 to be freely rotatable.

The running wheels 54 comes into rolling contact with a part of thesurface (upper surface) of the press plate 55 so as to straddle a longhole 56, which is formed in the press member 44 to extend in alongitudinal direction with respect to a press plate 55, that is, in acolumn direction C of a color measurement pattern described below(identical to the main scanning direction B).

The carriage reciprocating unit 43 is a unit that causes the color meter41 held by the color meter holder 42 to reciprocate in the columndirection C of the color patch CP. Specifically, the carriagereciprocating unit 43 includes a color measurement carriage 57 that isconnected to the color meter holder 42 through the follow-up mechanism51 and reciprocate together with the color meter 41, two guide shaftsthat guide the color measurement carriage 57 and have a primary shaft 58and a secondary shaft 59, and a color measurement carriage motor 60 thatis disposed at a return position to serve as a driving source when thecolor measurement carriage 57 reciprocates. The carriage reciprocatingunit 43 also includes a pinion gear 61 that is attached to an outputshaft of the color measurement carriage motor 60, a transfer gear 62that is meshed with the pinion gear 61, a driving pulley 63 that isformed integrally with the transfer gear 62, a driven pulley 64 that isprovided at a home position, and an endless timing belt 65 that is woundbetween the driving pulley 63 and the driven pulley 64, a part of thetiming belt being engaged with the color measurement carriage 57.

The follow-up mechanism 51 is a mechanism that allows the running wheels54 provided at the lower surface of the color meter holder 42 toconstantly ground on the press plate 55 and to run. The follow-upmechanism 51 ensures smooth movement between the tile holder 48constituting the calibration unit 46 and the press plate 55.Specifically, the follow-up mechanism 51 includes the above-describedparallel ring mechanism 53 and a pressurization torsion coil spring.

The press member 44 is a member that rotates so as to take a pressposture (a position indicated by a solid line in FIG. 3) to press thesurface of the roll paper R with the color patch CP recorded thereonduring color measurement and a retracted posture (a position indicatedby a two-dot-chain line in FIG. 3) to spring upward and allow the rollpaper R to be transported while color measurement is not performed.Specifically, the press member 44 includes a rotation lever 68 thatrotates at approximately 90° around a rotational shaft 67, which isprovided integrally therewith, the above-described press plate 55 thatis rotatably connected to a rotational free end of the rotation lever 68through a rotational pin 69, a press plate support spring (not shown)that is provided between the rotation lever 68 and the press plate 55,and a press plate pressurizing spring (not shown). With the operation ofthe press plate support spring and the press plate pressurizing spring,the entire lower surface of the press plate 55 is brought into closecontact with the surface of the roll paper R tight. In this case, areactive force of the press plate pressurizing spring to return to theoriginal shape is applied to the press plate 55. Thus, the surface ofthe roll paper R is reliably held by a strong press force.

The rotation lever 68 is a curved plate-shaped lever extending in thecolumn direction C of the color measurement pattern, and the rotationalshaft 67 is formed near a rotational base end integrally with therotation lever 68 so as to protrude left and right outward. Fan gears 70with teeth formed at approximately 90° are provided on the left andright sides of the rotational shaft 67. The press plate 55 is a flatplate-shaped member extending in the column direction C of the colorpatch CP. At the center of the upper surface of the press plate 55, theabove-described long hole 56 extending in the column direction C of thecolor patch CP is formed so as to pass through the press plate 55 overthe press surface (lower surface) of the press plate 55.

Ribs are formed at the lower surface of the press plate 55 so as toprotrude downward only from the periphery of the long hole 56 and theperiphery of the press plate 55. The ribs are brought into contact witha blank portion, which is a space portion between a plurality of colorpatches CP. Thus, the press plate 55 can press the surface of the rollpaper R without coming into contact with the color patches CP of eachcolumn for profile creation.

The rotation shift unit 45 is a unit that switches between the pressposture and the retracted posture of the press member 44. Specifically,the rotation shift unit 45 includes a paper push motor 71 serving as adriving source, and a gear wheel train 72 for transmitting rotation ofthe paper push motor 71 to the fan gears 70.

The calibration unit 46 is formed by the tile holder 48 with the whitetile 47 held. The white tile 47 is a tile that is formed of ceramics toexecute calibration of the color meter 41 while color measurement is notperformed. The white tile 47 is detachably held by the tile holder 48.The tile holder 48 with the white tile 47 held is provided at the homeposition of the carriage reciprocating unit 43 on a lateral side of thetransport path of the roll paper R with the color patch CP recordedthereon. While color measurement is not performed, that is, the colormeasurement carriage 57 is positioned at the home position, the colormeter 41 covers the upper surface of the white tile 47 so as to preventdust from being stuck to the upper surface of the white tile 47.

FIG. 4 is a block diagram showing the electrical configurationconcerning communication in the printing system including such a printersystem 100.

A printing system 200 includes the printer system 100, and a hostapparatus 150 communicably connected to the printer system 100. The hostapparatus 150 includes, for example, a personal computer or the like.The host apparatus 150 is provided with, for example, a first printerdriver 151, which is constructed by installing software for a printerdriver. A communication section 152 of the host apparatus 150 isconnected to a communication section 74 of the printer 10 constitutingthe printer system 100 through a communication cable 75. Communicationbetween the communication sections 152 and 74 is based on, for example,IEEE 1284.4 (hereinafter, simply referred to as “D4”) communication orUSB communication.

The printer 10 is communicably connected to the winding device 30 andthe color measuring device 40. The color measuring device 40 of thisembodiment includes the color meter 41 and the color measurement drivingdevice 80 that use different control systems. The color measurementdriving device 80 includes the rotation shift unit 45 serving as adriving system of the press member 44, and the carriage reciprocatingunit 43 serving as a driving system of the color measurement carriage57. The color measurement driving device 80 controls the colormeasurement carriage motor 60 and the paper push motor 71. In thisembodiment, the printer 10 constitutes a first device, and the windingdevice 30 and the color measurement driving device 80 constitute asecond device.

The printer 10 includes a host communication section 81 that has a USBhost controller (hereinafter, referred to “USB host 81A”) functioning asa host through USB communication. The winding device 30, the color meter41, and the color measurement driving device 80 include devicecommunication sections 82 to 84 having USB device controllers(hereinafter, referred to as “USB devices 82A to 84A) functioning asdevices through USB communication, respectively. A hub 85 is connectedto the host communication section 81 of the printer 10, and the devicecommunication section 82 of the winding device 30, the devicecommunication section 83 of the color meter 41, and the devicecommunication section 84 of the color measurement driving device 80 areconnected to the hub 85 through USB cables 86 to 88, respectively.During USB communication, the USB host 81A requests the USB devices 82Ato 84A to send the device classes to which the devices belong. The USBdevices 82A to 84A send the device classes in response to the request.In this embodiment, the winding device 30 and the color measuring device40 are optional devices (auxiliary device) of the printer 10 andconnected to the printer 10 through the USB cables 86 to 88,respectively, as occasion demands.

For example, if a user who wants printing operates an input device 162(see FIG. 5) to print an image or text displayed on a monitor 150 a ofthe host apparatus 150, and the host apparatus 150 accepts the printinstruction, image data or text data to be printed is sent to the firstprinter driver 151. The first printer driver 151 generates print data(first control data) in a data format (print command format) using aprint command, which is being analyzable by the printer 10, on the basisof image data or text data to be printed, and transmits print data tothe printer 10 through communication between the communication sections152 and 74. In this case, the communication section 152 of the hostapparatus 150 requests the device class of the other side by pollingwith the communication section 74 of the printer 10, and establishescommunication under the condition that a response indicative of a“printer class” (specific class) capable of analyzing print data (printcommand) is received.

For example, if communication between the host apparatus 150 and theprinter 10 is based on USB communication, the USB host, which is thecommunication section 152 of the host apparatus 150, requests the USBdevice, which is the communication section 74 of the printer 10, to sendinformation for identifying the device class. Then, the communicationsection 74 sends a response indicative of the “printer class” set in theprinter 10 for the request, and the USB host establishes communicationwith the USB device. For this reason, print data (first control data)generated by the first printer driver 151 in the host apparatus 150 canbe transmitted to the printer 10.

As shown in FIG. 4, the printer 10 of this embodiment includes a secondprinter driver 89 serving as a device driver, and controls the windingdevice 30 and the color measurement driving device 80 by using printdata including the print command. The second printer driver 89 is asimple printer driver that is constructed by combining a necessaryfunction of the first printer driver 151, such as a command generationfunction or a print data generation function, and other necessaryfunctions. In this embodiment, as the print command used in the firstprinter driver 151 and the second printer driver 89, for example, ESC/P(Epson Standard Code for Printer), which is the standard command of theserial printer, is used. Of course, other print commands may be used.Alternatively, the second printer driver 89 may be a so-calledstandalone type printer that includes the same image data processingsection as an image data processing section 161. In this case, imagedata of an RGB coordinate system input through a storage medium, such asa memory card or the like, inserted into the printer 10 can be convertedinto print image data, and can be printed even though the printer is notconnected to the host apparatus 150.

The second printer driver 89 controls the winding device 30 and thecolor measurement driving device 80 by using ESC/P. For this reason, inorder for the USB host 81A of the printer 10 to establish communicationwith the USB devices 82A and 84A of the winding device 30 and the colormeasurement driving device 80, the USB devices 82A and 84A need totransmit a response indicative of a “printer class” for the request tosend the device class from the USB host 81A. In this embodiment, asshown in FIG. 4, with respect to the winding device 30 and the colormeasurement driving device 80, the “printer class” is set as the deviceclass.

Specifically, a model number representing a model of printer (forexample, the model number of the printer 10 or the model number ofanother printer) is set as a device ID. The model number is sent inresponse to the request to send the device ID from the USB host 81A, andthen the USB host 81A recognizes the “printer class” from the modelnumber (device ID). For this reason, print data (second control data)generated by the second printer driver 89 can be transmitted to thewinding device 30 and the color measurement driving device 80 throughcommunication between the USB host 81A and the USB devices 82A and 84A.

Meanwhile, as shown in FIG. 4, with respect to the color meter 41 thatis not controlled by print data, an “HID (Human Interface Device) class”is set as the device class. In this embodiment, a command analyzingsection that can analyze print data is not incorporated into the colormeter 41 manufactured and placed on the market by the color metermanufacturer. Accordingly, the color meter 41 is not controlled by usingprint data. Of course, the command analyzing section that can analyzethe print command (ESC/P) may be incorporated into the color meter 41,thereby constituting the second device.

FIG. 6 is a block diagram showing a layered structure (protocol stack)of communication protocols concerning communication between the printer10 and the color measurement driving device 80 or the winding device 30.The color measurement driving device 80 and the winding device 30 usethe same communication protocols concerning communication with theprinter 10. Thus, in the following description, a case in which thesecond device is the color measurement driving device 80 will bedescribed.

The host communication section 81 of the printer 10 includes a USB hostinterface (hereinafter, referred to as “USB host I/F 90”), USB systemsoftware 91, a USB printer class driver 92, a D4 (abbreviation of “IEEE1284.4”) packet processing section 93 in that order from below. Thesecond printer driver 89 is located above the host communication section81. The device communication section 84 (82) of the color measurementdriving device 80 includes a USB device interface (hereinafter, referredto as “USB device I/F 95”), a USB logic device 96, a USB printer classdriver 97, and a D4 packet processing section 98 in that order frombelow. A command analyzing section 124 (131) (also shown in FIG. 5) islocated above the device communication section 84 (82).

As understood from the drawing, the USB printer class drivers 92 and 97perform data communication by using a so-called “D4 packet” (packetstructure based on IEEE 1284.4). This is because, in the printer classfrom among the standard USB device classes, the D4 packet is used as thehigher-order protocol.

The communication control stack using no D4 packet (an architecture froman application layer to a physical layer) is the standard of the OS(Operating System) of the host apparatus 150 or the printer 10.Accordingly, when device classes other than the printer class are usedfor communication between the printer 10 and the optional device (thesecond device), it is necessary to construct a new communication controlstack. In contrast, in this embodiment, the existing communicationcontrol stack using the D4 packet for communication between the firstprinter driver 151 of the host apparatus 150 and the printer 10 is alsoused for communication between the printer 10 and the optional devices.

The communication control stack using the D4 packet is constructed on anassumption that print data is transferred. Accordingly, when the USBhost 81A establishes communication with the USB devices 82A and 84A, thedevice class of the other side needs to be set as the “printer class”.The USB host 81A requests the device on the other side to send thedevice ID, and if it is determined from the content of the device IDthat the device class is the “printer class”, establishes communication.For this reason, with respect to the color measurement driving device 80and the winding device 30, as described above, the device IDrepresenting the model of the printer is set. An ID unique to eachdevice for individually identifying the devices is also set separately.

As shown in FIG. 6, first, physical communication between the USB hostI/F 90 and the USB device I/F 95 is performed by connecting the USBcable 88 (86). The next level is communication by system software of thehost (printer 10) (the device driver level of the OS). In this case,logical connection of communication, called a “default pipe”, isestablished between the host and the device. Initialization of systemsettings, and communication for various kinds of setup control when theUSB cable is connected, that is, configuration (setup) is performed bycontrol transfer using the default pipe (bidirectional communication),and setup information concerning how to use the device is exchangedbetween the host and the device. The host requests the device to sendthe setup information, such as the number of pipes to be used, atransfer mode (bulk transfer or interrupt transfer), or the like, andsets the use condition of the device on the basis of the setupinformation from the device. In this embodiment, in the case of the“printer class”, bulk transfer is set, and in the case of the “HIDclass”, interrupt transfer is set.

The next level is a level of application at which a plurality of“pipes”, which are logical communication lines between the USB printerclass drivers 92 and 97, are connected. The pipes are logicalcommunication lines, and real communication is performed on a single USBcable 88 (86) in a time-division manner.

A next level is a level of application of D4 at which if a logicalcommunication line between the D4 packet processing sections 93 and 98is established, packet transfer based on a communication protocol for D4is performed between the D4 packet processing sections 93 and 98.

FIG. 5 is a block diagram showing the electrical configuration of theprinting system. The host apparatus 150 includes the first printerdriver 151, a color measurement driver 153, and an image displayapplication 154. The first printer driver 151 and the color measurementdriver 153 are constructed by installing a program on the host apparatus150. For example, the first printer driver 151 is provided by theprinter manufacturer, and the color measurement driver 153 is providedby the color meter manufacturer. The first printer driver 151 includes aprint data generating section 155 generating print data, a host controlsection 156, and a data storage section 157. The print data generatingsection 155 includes a logical coordinate calculating section 159, acommand generating section 160, and an image data processing section161. An input device 162 is connected to the host apparatus 150. Theinput device 162 includes, for example, a keyboard, a mouse, or thelike.

The color measurement driver 153 has a setup screen display function todisplay a setup screen for color measurement setup, a color patchpattern setup function, and a color patch print position setup function.The color measurement driver 153 also has a function to display a paperrange including an image displayed by the application 154 on the setupscreen and to set a color patch in a desired area within the paperrange.

FIG. 9 schematically shows a setup screen for color measurement that isdisplayed on the monitor 150 a of the host apparatus 150 by the colormeasurement driver 153. A setup screen 140 is displayed when a useroperates the input device 162 of the host apparatus 150 to activate thecolor measurement driver 153. The user can operate the input device 162to display a print image IG (image) on the setup screen 140, and also toselect a color pattern of the color patch CP and set the position of thecolor patch CP. For example, the user selects a desired pattern, thenumber of colors, color, and the number of color patch columns on acolor patch selection window, and specifies the print position of theselected color patch CP with a mouse, for example, to set the colorpatch CP at a desired position, such as a blank area having no printimage IG. The print position of the specified color patch is acquired bythe color measurement driver 153 in the host apparatus 150 as a logicalcoordinate, which is represented by a relative coordinate with respectto the reference point of the paper area. Specifically, the logicalcoordinate is represented by the relative coordinate with an upper leftcorner of the paper area (the entire range corresponding to one page) inFIG. 9 as the origin (0,0) and X and Y coordinates in the paper widthdirection (the main scanning direction B) (the right direction of FIG.9) and a direction opposite the transport direction (the down directionof FIG. 9). For example, as shown in FIG. 9, with respect to the printimage IG, the upper left cornet is represented by the coordinate(Xps,Yps), and the lower right corner is represented by the coordinate(Xpe,Ype).

Each of the color patches CP includes a patch column PR having arrangeda plurality of unit patches D, and start position mark MS and endposition mark ME disposed at a predetermined interval on both sides ofthe patch column PR in the column direction. In the example of FIG. 9where two columns of color patches CP are arranged, the color patches CPare represented by the Y coordinates Y1 and Y2, and the X coordinates(X1, x2, . . . , Xn−1, and Xn) concerning N unit patches D constitutingeach patch column PR in order from the home position (the left side inFIG. 9) of the color measurement carriage 57 (see FIG. 3). The logicalcoordinate values concerning the color patches CP are used to decide acolor measurement point when the color meter 41 moves along with thecolor measurement carriage 57 to perform color measurement for the unitpatches D. The coordinate of each unit patch D represents, for example,the center point of each unit patch D.

For example, the Y coordinate value of the color patch CP is used as atarget position when the roll paper R is fed to position at a colormeasurement position. The X coordinate value of each unit patch Dconstituting the color patch CP is used as a target position when thecolor measurement carriage 57 is positioned in the patch columndirection C such that the color measurement point of the color meter 41is aligned with the center point of each unit patch.

If the length of the patch column PR (hereinafter, referred to as “patchcolumn length L”) in the column direction C and the number of unitpatches D (hereinafter, referred to as “patch number N”) constitutingthe patch column PR are known, the pitch (=L/N) of the unit patches Dcan be calculated. In addition, if the X coordinate “X1” of the leadingunit patch D is known, the color measurement points of other unitpatches D can be calculated. For this reason, data concerning the colorpatch CP includes information concerning the patch column length L andthe patch number N. The print image IG, image data of the color patchCP, the logical coordinates, and information concerning the patch columnlength L and the patch number N of the color patch CP are sent from thecolor measurement driver 153 to the first printer driver 151. In FIG. 9,the Y coordinate “Yc” representing the end (in the drawing, the lowerend) of the paper area in the transport direction A is used to decide acut position when the roll paper R is cut with a cutter (not shown). Thecolor measurement driver 153 generates a color measurement commandcontrolling the color meter 41, and sends the color measurement commandto the first printer driver 151. Data that is input to the hostapparatus 150 by using the input device 162 corresponds to an inputvalue.

The first printer driver 151 shown in FIG. 5 performs a processing togenerate print data including a print command on the basis of the imagedisplayed on the monitor 150 a by the application 154, and image data ofthe color patch CP and logical coordinate data set by the colormeasurement driver 153. In this embodiment, control of the windingdevice 30, the color meter 41, and the color measurement driving device80, as well as printing control of the printer 10, is instructed on thebasis of print data. For this reason, in order to generate print data,the first printer driver 151 includes the logical coordinate calculatingsection 159, the command generating section 160, and the image dataprocessing section 161 described above.

The command generating section 160 generates a command using the printerdescription language (printer control code). In this embodiment, asdescribed above, an ESC/P command is used as the printer descriptionlanguage for the serial printer. Of course, when the printer 10 is apage printer, ESC/Page may be used as the printer description language.The details of a processing in the command generating section 160 willbe described below in detail.

The logical coordinate calculating section 159 calculates a value to bestored in the command created by the command generating section 160 onthe basis of the print image IG input and specified by the user'soperation of the input device 162 on the setup screen 140 for colormeasurement, the logical coordinate of the color patch CP defining theprint area, or the logical coordinate of the color measurement point ofthe color patch CP. Examples of the value to be calculated include apaper feed amount to the print position of an image to be printed or thecolor patch CP, a paper feed amount to a color measurement positionwhere the color meter 41 can perform color measurement for the colorpatch CP, an operation position (a color measurement position in thepatch column direction C), which is the target position of the colormeasurement carriage 57 at the time of color measurement, and the like.The values are calculated as the values, such as the drive amount or thetarget position of a motor to be controlled and the like.

The image data processing section 161 converts image data for displayinto image data for printing. Specific examples include resolutionconversion to convert display resolution into printer resolution, colorconversion to convert image data from the RGB color system to the CMYKcolor system (respective colors of cyan, magenta, yellow, and black)that can be expressed by the printer 10, halftoning to change thegray-scale value of image data to a gray-scale value that can beexpressed by the printer, data output sequence adjustment (for example,micro weave) to rearrange the output sequence of data to the recordinghead 19 in accordance with the ink droplet ejection sequence based on aprint mode, and the like. Color conversion is performed by using a colorconversion table. With respect to halftoning, a known method, such asso-called error diffusion, dithering, or the like, may be used. Thecontents of such processing are known, and thus further descriptionswill be omitted. Image data that is subjected to an image processing forprinting is called print image data.

The first printer driver 151 has a function to display a setup screenfor input and setup of a print condition on the monitor 150 a of thehost apparatus 150. The user can operate the input device 162 on thesetup screen to set the print condition. The print condition includespaper type, paper size, color/monochrome, layout (set margin, print withno border, and the like), print mode (for example, high-quality printmode, high-speed print mode, and the like), and the like. Imageprocessing, such as resolution conversion, color conversion, halftoning,data output sequence adjustment, and the like, is performed inaccordance with the contents of the print condition.

The first printer driver 151 generates print data (ESC/P control data)including various commands generated by the command generating section160 and print image data generated by the image data processing section161. The structure of print data that is generated by the first printerdriver 151 will be described. FIG. 7 shows the structure of print dataPD that is generated by the first printer driver 151. In the followingdescription, a symbol representing a command is not interpreted to matchwith a real print command, and for convenience of explanation, a simplesymbol is used. As shown in FIG. 7, print data PD has a header HD and abody BD. In the header HD, header information, such as the data size ofthe body BD and the like, is described. In the body BD, ESC/P controldata SD is stored.

As shown in FIG. 7, ESC/P control data SD stores various controlcommands or control codes, print image data, and the like between a jobstart code (in FIG. 7, represented by “JS”) and a job end code (in FIG.7, represented by “JE”). FIG. 7 shows a state where almost all kinds ofcommands or data that can be stored as data are stored, but actually,some commands or data of them are stored to constitute print data.

As shown in FIG. 7, ESC/P control data SD includes a print controlcommand PCC, print image data PGD, a paper feed control command PFC, awinding control command WCC, a color measurement driving control commandCMDC, and a color measurement control command CMC. Usually, the packetsof print data, in which some commands or data is stored, are rotated andtransmitted multiple times. In this case, the job start code “JS” isstored in print data to be initially transferred during one job, and thejob end code “JE” is stored in print data to be finally transferredduring the job. In ESC/P control data SD, the control commands or printimage data is divided and stored for a plurality of modes. The modesinclude a character mode, a graphic mode, and a remote mode. In ESC/Pcontrol data SD, control codes for transition of the respective modes,that is, a character mode transition code “MC”, a graphic modetransition code “MG”, and a remote mode transition code “MR” areincorporated. Subsequent to each mode transition code, a command to beanalyzed in the corresponding mode is stored.

That is, the print control command PCC is stored subsequent to thecharacter mode transition code “MC”, and print image data PGD (headcontrol data) is stored subsequent to the graphic mode transition code“MG”. The print control command PCC includes, for example, pageinformation for specifying a print start position/end position withrespect to the roll paper R or positional information in the transportdirection for specifying the paper feed amount of the roll paper R inaccordance with the number of nozzles of the recording head 19 or thelike. Print image data PGD (raster data) is data for controlling drivingof the recording head 19 to eject ink droplets. As described above, theprint control command PCC and print image data PGD are data for printingcontrol of the printer 10.

A remote command RC is stored subsequent to the remote mode transitioncode “MR”. The remote command RC may be included in ESC/P control datafor control other than printing control of the printer 10. In theprinter 10, the remote command RC is generally provided so as to operatea maintenance device (not shown) to clean the nozzles of the recordinghead 19 or so as to perform operation control of a maintenance system tosuppress nozzle clogging through regular idle ejection (flushing) duringprinting.

In this embodiment, the function of the remote command RC is used, andthus the command for control of the color measuring device 40 and thewinding device 30 is stored as the remote command RC. That is, as shownin FIG. 7, the paper feed control command PFC, the winding controlcommand WCC, the color measurement driving control command CMDC, thecolor measurement control command CMC, and the like are storedsubsequent to the remote mode transition code “MR”. In addition, acleaning command, a flushing command, and the like (not shown) are alsostored.

The paper feed control command PFC is a paper feed command that is usedto feed the roll paper R to a color measurement position where the colorpatch CP is aligned with a color measurement spot of the color meter 41in the transport direction A while color measurement is performed.

The winding control command WCC is a command that is used to control thewinding motor 32 of the winding device 30. In this embodiment, thewinding control command WCC is used to reversely drive the windingdevice 30 according to reverse rotation of the transport roller 21 andthe paper discharge roller 22 when the roll paper R is fed backward inorder to return the roll paper R to a next print start position aftercolor measurement is completed.

A color measurement command that is used to control the color measuringdevice 40 is stored subsequent to a color measurement mode transitioncode “CM” for transition to a color measurement mode in the remotecommand RC, and as shown in FIG. 9, a color measurement driving controlcommand CMDC and a color measurement control command CMC are storedsubsequent to the color measurement mode transition code “CM”. Duringthe color measurement mode, the color measurement driving controlcommand CMDC and the color measurement control command CMC are to beanalyzed.

The color measurement driving control command CMDC is a command that isused to control the paper push motor 71 and the color measurementcarriage motor 60 of the color measuring device 40. The colormeasurement control command CMC is a command that is used to control thecolor meter 41, and is described with control codes that are used by thecolor meter manufacturer. The color measurement control command CMC isdelivered from the color measurement driver 153. Though not shown inFIG. 7, a mode end code (not shown) is stored at the end of the commandfor each mode.

The host control section 156 undertakes control in the first printerdriver 151, and performs instruction for generation of print data to therespective sections 159 to 161, display control on the print conditionsetup screen, communication control (transmission instruction) fortransmission of print data to the printer 10, decision of pertinence ofthe color condition on the basis of color measurement data from thecolor meter 41, setting of the color correction value, and the like. Thedata storage section 157 is a data storage area in which generated printdata or the like is temporarily stored before transmission or colormeasurement data received from the color meter 41 is temporarily storedbefore decision or an arithmetic operation. Print data generated by thefirst printer driver 151 is transferred from the communication section152 of the host apparatus 150 to the printer 10 through thecommunication section 74 in sequence in accordance with an instructionof the host control section 156.

Returning to FIG. 5, the electrical configuration of the printer system100 will be described. As described above, the printer system 100includes the printer 10, the winding device 30, and the color measuringdevice 40. The color measuring device 40 includes the color measurementdriving device 80 and the color meter 41. As described with reference toFIG. 4, the host communication section 81 of the printer 10 is connectedto the device communication sections 82 to 84 of the three devices 30,41, and 80 through the hub 85 and the three USB cables 86 to 88.

As shown in FIG. 5, the printer 10 includes a command analyzing section101 (ESC/P analyzing section) serving as a first analyzing unit, asecond printer driver 89 (control driver), a memory 102 (image buffer),a control section 103 serving as a first control unit, driving circuits104 to 106, a recording head 19, a CR motor 107, a PF motor 108, anencoder 109, a paper detection sensor 110, a paper width sensor 111, anda linear encoder 112. The control section 103 includes a head controlsection 113, a carriage control section 114, and a paper feed controlsection 115.

The second printer driver 89 is a simple printer driver and, similarlyto the first printer driver 151, has a function to generate print dataof ESC/P. The second printer driver 89 is constructed to have some ofthe functions of the existing first printer driver 151 by using theexisting first printer driver 151. The second printer driver 89 includesa remote command analyzing section 116, a command generating section117, and a coordinate calculating section 118. However, print data thatis generated by the second printer driver 89 is not used for printing,but it is used for control of the color measurement operation and thewinding operation.

The command analyzing section 101, the second printer driver 89, and thecontrol section 103 include, for example, a CPU, an ASIC (ApplicationSpecific IC), a ROM, a RAM, and the like. In this example, the commandanalyzing section 101 is formed by hardware, for example, an ASIC, andthe second printer driver 89 and the control section 103 are formed bysoftware, which is implemented by a program stored in the ROM to beexecuted on the CPU. Of course, all of them may be formed by software,hardware, such as an integrated circuit (for example, a custom ICincluding an ASIC or the like), or a combination of software andhardware (in this case, an arbitrary combination may be selected).

The command analyzing section 101 analyzes print data (ESC/P controldata), and if a mode transition code is detected from print data,changes the operation mode to a mode specified by the corresponding code(that is, activates an analysis module according to the mode). There arethree modes of the character mode, the graphic mode, and the remotemode. A command to be analyzed is decided for each mode. The command tobe analyzed for each mode is analyzed and sent to a destinationaccording to the mode at that time. For example, in the case of thecharacter mode, the print control command PCC is analyzed and sent tothe control section 103. In the case of the graphic mode, print imagedata PGD is analyzed and sent to the memory 102. In the case of theremote mode, the remote command is analyzed and sent to the secondprinter driver 89. In this case, the commands other than the command tobe analyzed in each mode are discarded.

Hereinafter, the analysis processing of the command analyzing section101 will be described. The command analyzing section 101 analyzes printdata PD (ESC/P control data) shown in FIG. 7. If a mode transition codeis present in ESC/P control data SD of the body BD of print data PD, thecommand analyzing section 101 changes the operation mode to a modespecified by the code. A command to be analyzed is changed according tothe modes, and the command analyzing section 101 analyzes only a commandthat can be handled in the corresponding mode and discards the commandsor data that is not handled in the corresponding mode. That is, if thecharacter mode transition code “MC” is present, the command analyzingsection 101 changes the operation mode to the character mode, analyzesonly the print control command PCC, sends the print control command PCCto the control section 103, and discards other data (commands or thelike). If the graphic mode transition code “MG” is present, the commandanalyzing section 101 changes the operation mode to the graphic mode,analyzes only print image data PGD, sends print image data PGD to thememory 102, and discards other data. If the remote mode transition code“MR” is present, the command analyzing section 101 changes the operationmode to the remote mode, analyzes only the remote command RC, sends theremote command RC to the second printer driver 89, and discards otherdata.

Specifically, if the character mode transition code MC is present, thecommand analyzing section 101 changes the operation mode to thecharacter mode, and analyzes the print control command PCC (see FIG. 7).As the result of analysis, if the print control command PCC (forexample, including a character code, such as ASCII code or the like) ispresent, the print control command PCC is sent to the control section103. The control section 103 converts the character code into image databy using a character generator (not shown) and stores image data in thememory 102. The head control section 113 drives the recording head 19 insynchronization with an ink ejection timing signal based on image data(raster data) read from the memory 102 by one pass (the drive amount ofthe carriage 17 in the main scanning direction B every time), and ejectsink droplets from the nozzles of the recording head 19 with apredetermined timing while the carriage 17 is traveling in the mainscanning direction B. The control section 103 sends a carriage drivecommand (hereinafter, referred to as “CR drive command”) to the carriagecontrol section 114, and sends a paper feed command to the paper feedcontrol section 115.

Meanwhile, if the graphic mode transition code MG is present, thecommand analyzing section 101 changes the operation mode to the graphicmode, and analyzes print image data PGD (see FIG. 7). As the result ofanalysis, if print image data PGD is present, print image data PGD issent to the memory 102. The control section 103 calculates a startposition and a stop position during one pass of the carriage 17 based onprint image data PGD read from the memory 102 by one pass. Then, if acarriage activation time for a next pass comes, the control section 103sends the CR drive command to the carriage control section 114, andinstructs to activate the carriage 17. If a paper feed start time comesafter printing in the previous pass ends, the control section 103 sendsthe paper feed command to the paper feed control section 115, andinstructs a paper feed operation. The paper feed operation used hereinincludes a paper feed operation, a paper feed operation during printing(narrow sense), and a paper discharge operation.

The paper feed control section 115 drives the PF motor 108 through thedriving circuit 106 on the paper feed command and feeds the roll paper Rby the amount as instructed. If the roll paper R is sent to a next printposition, the carriage control section 114 drives the CR motor 107through the driving circuit 105 on the basis of the CR drive command,and operates the recording head 19 in the main scanning direction B byone pass. During one pass, the head control section 113 drives therecording head 19 through the driving circuit 104 on the basis of printimage data PGD. Then, ink droplets are ejected from the nozzles of therecording head 19, printing (recording) for one raster line is performedon the basis of print image data PGD.

The recording head 19 is provided with an ejection driving element foreach nozzle. If the ejection driving element is driven by an applicationvoltage of a predetermined waveform, ink droplets are ejected from thenozzles. As the ejection driving element, a piezoelectric vibratingelement or an electrostatic driving element may be used. In addition, aheater for ink heating may be used. In this case, ink is film-boiled,and ink droplets are ejected from the nozzles by expansion of bubbles inthe ink flow channel communicating with the nozzles.

If the remote mode transition command MR is present, the commandanalyzing section 101 changes the operation mode to the remote mode,analyzes the remote command RC as the command to be analyzed, and sendsthe analyzed remote command RC to the second printer driver 89. That is,in the remote mode, the command analyzing section 101 analyzes theremote command RC, and sends the paper feed control command PFC and thewinding control command WCC to the second printer driver 89. The commandanalyzing section 101 analyzes the remote command RC, if the colormeasurement mode transition code “CM” is present, and changes theoperation mode to the color measurement mode to send the colormeasurement driving control command CMDC and the color measurementcontrol command CMC to the second printer driver 89.

The second printer driver 89 generates a new command based on the remotecommand, and transmits the new command in a print data format to controlthe color meter 41, the color measurement driving device 80, and thewinding device 30. The remote command generated by the first printerdriver 151 has a value specified by the logical coordinate system. Forexample, the value “Y” of the paper feed command “PF(Y)” is specified asthe value of the logical coordinate system on the paper calculated bythe logical coordinate calculating section 159. Therefore, even if theroll paper R is misaligned from the reference position on the printer10, the second printer driver 89 generates a command specified by thevalue of the real coordinate system converted from the logicalcoordinate system, such that recording or color measurement can beaccurately performed at a position on the roller paper R represented bythe logical coordinate.

The logical coordinate is an ideal coordinate system on an assumptionthat the roll paper R is not misaligned in the transport direction A andthe paper width direction. The logical coordinate is a coordinate systemin which the recording position or the color measurement position of thecolor patch CP is represented by coordinates with a predeterminedposition (in this example, the upper left corner of each page) of theroll paper R as the origin (0,0) (see FIG. 9).

In contrast, the real coordinate is a coordinate system on an assumptionthat the roll paper R is slightly misaligned in the transport directionA and the paper width direction, in which the recording position or thecolor measurement position of the color patch CP is represented with aseparate position (reference position) from the roll paper R as theorigin. Accordingly, in the real coordinate system, the coordinate valueis obtained in consideration of the misalignment amount of the rollpaper R. For this reason, if a command specifying the value of the realcoordinate system is generated, position control of an object to becontrolled (for example, the roll paper R, the color measurementcarriage 57, the color meter 41, or the like) is possible so as to beaccurately positioned at the real recording position or colormeasurement position, regardless of misalignment of the roll paper R. Inthis embodiment, with respect to the origin of the real coordinatesystem, as shown in FIG. 10A, the front end of the roll paper R reachesthe set reference position of the recording head 19 (for example, theuppermost nozzle position) is used as the origin “0” in the transportdirection A. The home position (see FIG. 11) of the color measurementcarriage 57 (or the color meter 41) is used as the origin in the mainscanning direction B (paper width direction).

Conversion from the value of the logical coordinate system to the valueof the real coordinate system is performed by using the measurementvalue of the position of the roll paper R in the transport direction Aand the measurement value of the position of the roll paper R in themain scanning direction B (paper width direction). For this reason, inthe printer 10 of this embodiment, paper position information concerningthe positions of the roll paper R in the transport direction A and themain scanning direction B (paper width direction) is measured.

Next, a method of acquiring position information of the roll paper R,which is used when a command is generated by the second printer driver89, will be described. In this embodiment, as the position informationof the roll paper R, the position of the roll paper R in the transportdirection A, the position of the roll paper R in the main scanningdirection B (misalignment amount), and the misalignment amount in themain scanning direction B due to skewed movement of the roll paper R atthe position of the color meter 41 on the downstream side in thetransport direction from the detection position with respect to theposition of the roll paper R in the main scanning direction B arecalculated.

First, the position of the roll paper R in the transport direction A ismeasured by using the paper detection sensor 110, the encoder 109, and acounter 115A in the paper feed control section 115. The encoder 109shown in FIG. 5 detects rotation of the PF motor 108 and outputs anencoder signal having pulses proportional to the rotation amount. Theencoder 109 detects, for example, rotation of the rotary shaft of thegear wheel train on a power transmission path of the PF motor 108,thereby indirectly detecting the rotation of the PF motor 108. The paperdetection sensor 110 is located at a predetermined position on thetransport path of the roll paper R, and detects the front end of theroll paper R while the roll paper R is being fed.

FIGS. 10A and 10B are schematic side views illustrating a method ofmeasuring the position of the roll paper R in the transport direction A.As shown in FIGS. 10A and 10B, the paper detection sensor 110 isdisposed on the upstream side in the transport direction (in FIGS. 10Aand 10B, on the right side) slightly from the transport roller 21 on thetransport path of the roll paper R, and detects the front end of theroll paper R to be fed. If the paper detection sensor 110 detects thefront end of the roll paper R, the paper feed control section 115 resetsthe counter 115A, and counts the number of pulses of the encoder signalfrom the encoder 109. If the front end of the roll paper R reaches theset reference position (for example, the uppermost nozzle position) ofthe recording head 19 shown in FIG. 10A from the count value, thecounter 115A is reset, and the origin of the roll paper R is set.Thereafter, the number of pulses of the encoder signal from the encoder109 is counted with the position as the origin. In this case, when thePF motor 108 rotates forward, the count value increments, and when thePF motor 108 rotates backward, the count value decrements. In this way,the real position of the roll paper R in the transport direction A canbe recognized on the basis of the counter 115A. That is, the count valueof the counter 115A represents the value of the y coordinate at the setreference position (for example, the uppermost nozzle position) when thefront end of the roll paper R is set to “0”.

For example, if the roll paper R is disposed at a position indicated bya solid line in FIG. 10B when a print image for color measurement isprinted for one page, the real position y of the roll paper R at thattime becomes y=yp from the count value of the counter 115A. The realposition of the roll paper R when the color patch CP is printed is heldby storing the count value of the counter 115A at that time in apredetermined storage area of the memory 102. For example, print of thecolor patch CP is grasped from an identifier indicative of the colorpatch CP in print data, or the position is acquired from the count valueof the counter 115A when the color patch CP is printed by identifyingthe color patch on the basis of image analysis of print image data. Theposition of the color meter 41 in the transport direction A isprescribed and known, and thus the value L corresponding to the countercount value of the distance between the position of the color meter 41and the set reference position is known. Therefore, if a difference(yp−ycp) between the current paper position yp and the position ycp ofthe color patch CP is subtracted from the value L, the paper feed amountΔy (=L−yp+ycp) required to transport the roll paper R from a print endposition (a position indicated by a solid line in FIG. 10B) to a colormeasurement position (a two-dot-chain line in FIG. 10B) where the colormeter 41 performs color measurement for the color patch CP is obtained.

Next, a method of measuring the position of the roll paper R in the mainscanning direction B (paper width direction) and the misalignment amountof the color measurement position (X direction) in the paper widthdirection due to skewed movement of the roll paper R will be described.The position or the misalignment amount of the roll paper R in the paperwidth direction is measured by using the paper width sensor 111, thelinear encoder 112, and a counter 114A in the carriage control section114.

The paper width sensor 111 of the FIG. 5 is attached to the carriage 17,and moves in the main scanning direction B along with the carriage 17 todetect the positions of both ends of the roll paper R in the paper widthdirection. The linear encoder 112 outputs an encoder signal havingpulses proportional to the movement amount of the carriage 17 in themain scanning direction B. The carriage control section 114 incrementsthe count value of the counter 114A, which is reset when the carriage 17is disposed at the home position, during forward movement, anddecrements the count value of the counter 114A during backward movement.In this way, the position (the position of the real coordinate system)of the carriage 17 in the main scanning direction B is grasped from thecount value of the counter 114A. The control section 103 instructs thecarriage control section 114 to move the carriage 17 in the mainscanning direction B regularly during printing. At this moment, thepaper width sensor 111 detects the positions of both ends of the rollpaper R in the paper width direction. The position of the roll paper Rin the paper width direction, that is, the misalignment amount in thepaper width direction from the reference position is grasped from thecount value of the counter 114A when the paper width sensor 111 detectsthe positions of both ends of the roll paper R in the paper widthdirection. For example, a predetermined position Xo (for example, apatch recording position) represented by the relative position (logicalcoordinate) in each page of the roll paper R can be converted into aposition xo (=Xo+Δx1) of the real coordinate system with themisalignment amount Δx1 added on the basis of the misalignment amountΔx1 of the roll paper R in the paper width direction (the main scanningdirection B) from the reference position.

Two different positions in the transport direction of the roll paper Rwhen the paper width sensor 111 detects both ends of the roll paper Rregularly during printing are compared, thereby measuring a degree ofskewed movement of the roll paper R. For example, if the detectedpositions of both ends of the roll paper R have the coordinates xr andxl, the average is calculated to obtain the x coordinate of the centerof the roll paper R in the width direction. The degree of skewedmovement Sc is calculated by Sc=(x2−x1)/(y2−y1) by using the xcoordinates x1 and x2 of the center of the roll paper R in the widthdirection when the positions of the roll paper R have the coordinates y1and y2. Let the distance between the paper width sensor 111 and thecolor meter 41 in the y direction be YL, then, the misalignment amountΔx2 of the position in the paper width direction due to skewed movementof the roll paper R at the position of the color meter 41 with respectto the detection position of the roll paper R in the width direction iscalculated by Δx2=YL·Sc. The misalignment amount Δx3 (=Δx1+Δx2), whichis the sum of the misalignment amount Δx1 of the roll paper R in thepaper width direction from the reference position and the misalignmentamount Δx2, becomes the misalignment amount of the roll paper R in thepaper width direction at the position of the color meter 41. Forexample, a predetermined position Xo (for example, a color measurementposition) in each page of the roll paper R can be converted into aposition xo (=Xo+Δx3) of the real coordinate system with themisalignment amount Δx3 added by using the misalignment amount Δx3. Themeasurement values Δx1 and Δx3 are used when coordinate calculation isexecuted by the second printer driver 89.

Next, a processing to be executed by the second printer driver 89 shownin FIG. 5 will be described in detail. The second printer driver 89accepts the remote command RC from the command analyzing section 101.The remote command analyzing section 116 analyzes whether or not theremote command RC is a command that requires conversion from the logicalcoordinate system to the real coordinate system. In this example, as theresult of analysis by the remote command analyzing section 116, thepaper feed control command PFC, the winding control command WCC, thecolor measurement driving control command CMDC, and the like areanalyzed as commands, which require conversion from the logicalcoordinate system to the real coordinate system.

The command generating section 117 generates a command, in which thevalue of the real coordinate system is stored with the positionmisalignment amount of the roller paper R from the printer 10 added,from the command, in which the value of the logical coordinate systemanalyzed by the remote command analyzing section 116 as being subject tocoordinate conversion is stored. With respect to command generation, thecoordinate calculating section 118 converts the value of the logicalcoordinate system into the value of the real coordinate system. That is,the above-described coordinate conversion is performed. The commandgenerating section 117 has the same basic configuration of the commandgenerating section 160 of the first printer driver 151, and incorporatesthe value (color measurement position or drive amount) of the realcoordinate system calculated by the coordinate calculating section 118as the value of the command, thereby generating a control command for acolor measurement system and a winding system.

The coordinate calculating section 118 includes a paper positioncoordinate calculating section 118A and a carriage position coordinatecalculating section 118B. The paper position coordinate calculatingsection 118A converts the value of the logical coordinate systemspecified by a command for a paper feed system, such as a paper feedcontrol command or a winding control command, into the value of the realcoordinate system. For example, the color measurement position of thereal coordinate system in the transport direction A is calculated fromthe color measurement position in the transport direction A (the paperposition in the transport direction A when color measurement isperformed) as a value specified by the paper feed control command, whichinstructs the paper feed operation to the color measurement position.

For example, with respect to conversion of the value Yo of the logicalcoordinate system in the paper feed control command “PF(Yo)” representedby the relative position, the value Yo is added to or subtracted fromthe current value vpre of the real coordinate system represented by thecount value of the counter 115A at the time of the forward feedoperation in the transport direction A or the backward feed operation ina direction opposite to the transport direction. Thus, the value Yo ofthe logical coordinate system is converted into the value yo (=ypre±Yo).In this case, the paper feed control command of the real coordinatesystem is generated as “PF(yo)” by the command generating section 117.If the paper feed operation is executed and stops at a position wherethe count value of the counter 115A reaches yo, the roll paper R isdisposed at the position of the value Yo specified by the logicalcoordinate. When the value of the logical coordinate system of thewinding control command “PWpre(Yo)” is converted into the value of thereal coordinate system, the same is applied. Thus, the winding controlcommand of the real coordinate system is generated as “PWpre(yo)”. Inthis case, winding control only has the backward feed operation, and asa result, the value yo of the real coordinate system becomes yo=ypre−Yo.

The carriage position coordinate calculating section 118B converts thevalue of the logical coordinate system specifying the operation position(target position) in a command, which instructs an operation of thecolor measurement carriage 57 to the color measurement position (patchposition) in the X direction (the patch column direction C), into thevalue of the real coordinate system. That is, the color measurementposition of the real coordinate system is calculated from the colormeasurement position (the position in the X direction of the colormeasurement carriage where color measurement is to be performed) in thepatch column direction C specified by the logical coordinate system inthe command.

For example, the value Xo of the logical coordinate system in a colormeasurement driving control command “CCR(Xo)” is converted into thevalue xo (=Xo+Δx3) of the real coordinate system by using theabove-described misalignment amount Δx3 (=the sum of the misalignmentamount Δx1 in the paper width direction and the misalignment amount Δx2due to skewed movement) stored in a predetermined storage area of thememory 102. Here, Δx3 is positive when the roll paper R is misaligned inthe X direction, and is negative when the roll paper R is misaligned ina direction opposite the X direction. In this case, the colormeasurement driving control command of the real coordinate system isgenerated as “CCR(xo)” by the command generating section 117. For thecolor measurement operation, the color measurement carriage 57 is drivenand stops when the count value of a counter 125A (described below) formeasuring the position of the color measurement carriage 57 reaches thevalue xo. In this way, the operation position of the color measurementcarriage 57 can be positioned such that an optical spot for colormeasurement of the color meter 41 in the X direction is aligned with thecenter of the unit patch D subject to color measurement.

In this example, in deciding a print image or the print position of thecolor patch CP, the head control section 113 adds the misalignmentamount Δx1 of the roll paper R in the paper width direction based on thedetection result of the paper width sensor 111, thereby correcting theprint position in the main scanning direction B. Therefore, even if theroll paper R is misaligned in the paper width direction, the print imageor the color patch CP can be printed at a position on the roll paper Rcorresponding to the logical coordinate set by the relative position.Then, the color measurement position of the color measurement carriage57 in the X direction is corrected by conversion of the colormeasurement driving control command “CCR(Xo)” from the logicalcoordinate system to the real coordinate system in accordance with thecorrected print position of the color patch CP. For this reason, theposition accuracy of the color measurement position where colormeasurement is performed for each unit patch D with the print positionadjusted can be increased. When the distance between the paper widthsensor 111 and the color meter 41 in the transport direction A iscomparatively short, and an effect of skewed movement is negligible, themisalignment amount Δx3 may be substituted with the misalignment amountΔx1.

The value may have different dimensions before and after conversion fromthe logical coordinate system to the real coordinate system. That is,conversion may be performed with the same dimension, for example,“position→position”, “drive amount→drive amount”, and “transportamount→transport amount”, or may be performed with different dimensions,for example, “position→drive amount”, “drive amount→transport amount”,and “position→transport amount”, or vise versa.

As described above, the device communication sections 82 to 84 of thecolor meter 41, the color measurement driving device 80, and the windingdevice 30 are connected to the host communication section 81 of theprinter 10 having the above-described configuration through hub 85 andthe USB cables 86 to 88.

The color meter 41 includes, in addition to the device communicationsection 83, a command analyzing section 121, a color measurement controlsection 122, and a color measuring section 123. The color measuringsection 123 has a light emitting section emitting light for colormeasurement, and a light receiving section receiving light reflected byeach of the patches D of the color patch CP. Color measurement data(color measurement result) acquired by the color measuring section 123is sent from the color measurement control section 122 to the printer 10through USB communication, and is transmitted to the first printerdriver 151 of the host apparatus 150.

The color measurement driving device 80 includes, in addition to thedevice communication section 84, a command analyzing section 124 (ESC/Panalyzing section) serving as a second analyzing unit, a colormeasurement driving control section 125 serving as a second controlunit, driving circuits 126 and 127, a paper push motor 71, a colormeasurement carriage motor 60, and an encoder 130. The color measurementdriving control section 125 drives the paper push motor 71 through thedriving circuit 126 on the basis of a control command, and causes thepress member 44 to hold and release the roll paper R. The colormeasurement driving control section 125 grasps the position of the colormeasurement carriage 57 from the count value of the counter 125A, whichcounts the number of pulses from the encoder 130. The color measurementdriving control section 125 drives the color measurement carriage motor60 through the driving circuit 127 on the basis of a control commandafter the roll paper R is transported to the color measurement positionso as to move the color measurement carriage 57 to an operation positionfor color measurement.

The winding device 30 includes, in addition to the device communicationsection 82, a command analyzing section 131 (ESC/P analyzing section)serving as a second analyzing unit, a winding control section 132serving as a second control unit, a sensor 133, a driving circuit 134,and a winding motor 32. If a detection signal of accidental rotation ofthe roll paper R is input from the sensor 133, the winding controlsection 132 drives the winding motor 32 to rotate forward through thedriving circuit 134. Then, if accidental rotation is not detected, thewinding motor 32 stops. Accordingly, the roll paper R is wound by thewinding device 30. The winding control section 132 drives the windingmotor 32 to rotate backward by a specified drive amount through thedriving circuit 134 on the basis of the winding control command from thesecond printer driver 89. Therefore, the winding device 30 winds theroll paper R in synchronization with the backward feed operation of theroll paper R due to backward rotation of the transport roller 21 and thepaper discharge roller 22 when the PF motor 108 is driven to rotatebackward.

FIG. 11 is a schematic plan view showing the color measuring deviceduring color measurement. As shown in FIG. 11, the color patch CPsubject to color measurement is disposed below the long hole 56 of thepress member 44. The color patch CP includes the patch column PR havingarranged a plurality of unit patches D, and the start position mark MSand the end position mark ME disposed at a predetermined interval onboth sides of the patch column PR in the column direction. A state wherethe color meter 41 is located directly above the white tile 47 of thecalibration unit 46 is the home position of the color measurementcarriage 57. At the time of color measurement, the position of each unitpatch D as the coordinate (x coordinate) in the paper width direction(the main scanning direction B) with the home position as the origin,that is, the operation position of the color measurement carriage 57serving as a mobile for the color measurement operation is calculated.In this case, the second printer driver 89 calculates the operationposition of the color measurement carriage 57 at the time of colormeasurement in consideration of the misalignment amount Δx1 of each unitpatch D constituting the color patch CP in the paper width direction atthe position of the paper width sensor 111 and the misalignment amountΔx2 of the color measurement position in the paper width direction dueto skewed movement of the roll paper R with respect to the recordingposition.

FIGS. 12A and 12B are explanatory views illustrating the colormeasurement operation of the color meter 41 by the color measurementcarriage 57. The color measurement method includes scan colormeasurement shown in FIG. 12A and spot color measurement shown in FIG.12B. In the case of scan color measurement shown in FIG. 12A, the colormeter 41 moves at a constant speed as indicated by an arrow in FIG. 12A,and color measurement data is acquired each time the moving color meter41 reaches the color measurement point. At the time of scan colormeasurement, the marks MS and ME are recorded. Accordingly, the positionwhen the start position mark MS is detected is set as the origin, andcolor measurement data (narrowly defined color measurement data for eachunit patch) which is obtained each time the color meter 41 moves by thepatch pitch (=L/N) based on the patch column length L and the patchnumber N is stored in the buffer in association with the colormeasurement position at that time. In this case, the timing at which thecolor meter 41 acquires color measurement data each time it moves by thepatch pitch is decided on the basis of a synchronization signal which istransmitted to the color meter 41 by the second printer driver 89 toinstruct a color measurement data acquisition timing such that theoperation position of the color measurement carriage 57 sequentiallyacquired by the color measurement driving device 80 is synchronized withthe timing for movement by the patch pitch.

In the case of spot color measurement shown in FIG. 12B, the color meter41 moves in a direction indicated by an arrow in FIG. 12B and stops eachtime the color measuring section 123 reaches a position corresponding tothe center of the unit patch D, and each time the color meter 41 stops,color measurement data of the color meter 41 is acquired. With respectto spot color measurement, the operation position of the colormeasurement carriage 57 is calculated such that the color meter 41 stopsat a position where the color measuring section 123 performs colormeasurement for the center of each unit patch D. In this example, theoperation position of the color measurement carriage 57 is calculated asthe values of the real coordinate system with the misalignment amount Δxof the roll paper R in the paper width direction added, for example, x1,x2, . . . , and xn in that order from the home position (origin “0”). Ofcourse, in the case of scan color measurement, the position of each unitpatch D on the real coordinate system with the home position as theorigin may be calculated as the value with the misalignment amount Δx ofthe roll paper R in the paper width direction added, and colormeasurement data may be acquired each other the color meter 41 reachesthe calculated position.

Next, the processing of the remote command analyzing section 116, thecommand generating section 117, and the coordinate calculating section118 of the second printer driver 89 shown in FIG. 5 will be described indetail.

The remote command analyzing section 116 shown in FIG. 5 analyzes theremote command transmitted from the command analyzing section 101. Thisanalysis is to determine whether or not the command generating section117 needs to recreate a command. If it is necessary to recreate acommand, information (for example, the value of the logical coordinatesystem) necessary for conversion of a command having the value of thelogical coordinate system into a command having the value of the realcoordinate system may be acquired.

The coordinate calculating section 118 includes the paper positioncoordinate calculating section 118A and the carriage position coordinatecalculating section 118B. The paper position coordinate calculatingsection 118A converts the value represented by the logical coordinatesystem on the paper in the remote command RC into the value of the realcoordinate system of the paper represented by the color measurementposition, which is the position of the roll paper R in the transportdirection A where the color meter 41 perform color measurement for thecolor patch CP, or the transport amount when the winding device 30 isfed backward. For example, the value of the position of the color patchCP in the transport direction A represented by the logical coordinate inthe paper feed command of the color measurement driving control commandCMDC is converted into the value of the real coordinate system, and thetransport amount that is required until the roll paper R at the endposition in the transport direction A at the end of printing reaches thecolor measurement position where the color meter 41 can perform colormeasurement for the position of the color patch CP specified by thevalue of the real coordinate system. The value of the logical coordinatesystem that represents the print start position of a next page specifiedby the winding control command WCC is converted into the valuerepresented by the real coordinate system, and the transport amount thatis required until the value (print start position) of the realcoordinate system reaches a position corresponding to the nozzle of therecording head 19.

The carriage position coordinate calculating section 118B converts thevalue represented by the logical coordinate system of the operationposition (stop position) in the patch column direction C, at which thecolor measurement carriage 57 operates the color measurement carriage 57until the color measuring section 123 of the color meter 41 is oppositethe center of the unit patch D, into the value of the real coordinatesystem.

The counter 115A of the paper feed control section 115 counts thecumulative value of the paper feed amount with the front end of the rollpaper R at the set reference position as the origin (in FIGS. 10A and10B, the position “0”). The paper position coordinate calculatingsection 118A converts the value of the logical coordinate system in thetransport direction A represented by the relative position in one pageinto the value of the real coordinate system represented by the absoluteposition (cumulative value) over a plurality of pages with the front endof the roll paper R as the start point.

FIGS. 8A to 8D are explanatory views showing a method of generating acommand in the second printer driver. The second printer driver 89converts the values specified by the paper feed control command PFC, thewinding control command WCC, the color measurement driving controlcommand CMDC, and the color measurement control command CMC constitutingthe remote command RC from the logical coordinate system to the realcoordinate system, thereby generating a new command. FIG. 8A showsgeneration of the paper feed control command, FIG. 8B shows generationof the winding control command, FIG. 8C shows generation of the colormeasurement driving control command, and FIG. 8D shows generation of thecolor measurement control command.

As shown in FIG. 8A, it is assumed that a paper feed control commandPFCt of the logical coordinate system accepted by the second printerdriver 89 is specified with the value “Y” of the logical coordinatesystem, and is represented by “PF(Y)”. The second printer driver 89stores the value “y” of the real coordinate system obtained byconverting the value “Y” of the logical coordinate system, and generatesa paper feed control command PFCr of the real coordinate systemrepresented by “PF(y)”. The paper feed control command PFCr “PF(y)” issent from the second printer driver 89 to the paper feed control section115 as a command when the roll paper R is transported to the colormeasurement position.

As shown in FIG. 8B, a winding control command WCCt of the logicalcoordinate system accepted by the second printer driver 89 is specifiedwith a device code “WD” indicating that a target device is the windingdevice 30, and the value “Y” of the logical coordinate system. Thus, thewinding control command is represented by “PWrev(Y)”. The windingcontrol command WCC is a command that is used to drive the windingdevice 30 to rotate backward in synchronization with backward rotationof the transport roller 21 when the roll paper R is fed backward(backward feed). The paper position coordinate calculating section 118Aconverts the value “Y” of the logical coordinate system into the value“y” of the real coordinate system. The command generating section 117stores the calculated value “y” of the real coordinate system, and awinding control command of the real coordinate system is generated as“PWrev(y)”. Then, the device code “WD” and a command “ComWD”, whichinstructs to establish communication with the winding device 30, areattached before the winding control command “PWrev(y)” to generate awinding control command WCCr. The second printer driver 89 generatesESC/P control data in which the generated winding control command WCCris stored subsequent to the remote mode transition code “MR”, andtransmits ESC/P control data to the winding device 30 through USBcommunication.

As shown in FIG. 8C, a color measurement driving control command CMDCtof the logical coordinate system subsequent to the color measurementmode transition code “MC” stores a device code “CMD” indicating that thetarget device is the color measurement driving device 80, a paper pushcommand “CPH”, and color measurement carriage driving commands “CCR(X1),CCR(X2), . . . , and CCR(Xn)”. The carriage position coordinatecalculating section 118B converts the value “X” of the logicalcoordinate system specified by a color measurement carriage drivingcommand into the value “x” of the real coordinate system, and, generatescolor measurement carriage driving commands “CCR(x1), CCR(x2), . . . ,and CCR(xn)” by using the value “x” of the real coordinate system. Thedevice code “CMD” and a command “ComCMD”, which instructs to establishcommunication with the color measurement driving device 80, are attachedbefore the color measurement carriage driving commands “CCR(x1),CCR(x2), . . . , and CCR(xn)” to generate a color measurement drivingcontrol command CMDCr of the real coordinate system. The second printerdriver 89 generates ESC/P control data, in which the generated colormeasurement driving control command CMDCr is stored subsequent to theremote mode transition code “MR”, and transmits ESC/P control data tothe color measurement driving device 80 through USB communication.

As shown in FIG. 8D, a color measurement control command CMCt of thelogical coordinate system subsequent to the color measurement modetransition code “MC” stores a device code “CM” indicating that thetarget device is the color meter 41, and color measurement controlcommands “CM(L,N)”. The command generating section 117 attaches acommand “ComCM”, which instructs to establish communication with thecolor meter 41, to generate the color measurement control command CMCrof the real coordinate system to be transmitted to the color meter 41.The second printer driver 89 transmits ESC/P control data including theremote command RC, in which the color measurement control command CMCris stored, to the color meter 41.

The command analyzing sections 124 and 131 of the color measurementdriving device 80 and the winding device 30 basically has the sameconfiguration as the command analyzing section 101 in the printer 10. Inthis embodiment, the circuit board (port) that is used in the commandanalyzing section 101 in the printer 10 is mounted in the colormeasurement driving device 80 and the winding device 30 is also mounted.

The command analyzing section 124 of the color measurement drivingdevice 80 analyzes received ESC/P control data (print data), and if acolor measurement driving control command is present, transmits thecolor measurement control method to the color measurement drivingcontrol section 125. The color measurement driving control section 125drives the paper push motor 71 through the driving circuit 126 on thebasis of the paper push command in the color measurement drivingcommand. Meanwhile, the color measurement driving control section 125drives the color measurement carriage motor 60 through the drivingcircuit 127 on the basis of the color measurement carriage drivingcommand (hereinafter, referred to as “color measurement CR drivingcommand”) in the color measurement driving control command.

Next, the processing of the command analyzing section 101 and the secondprinter driver 89 will be described with reference to a flowchart ofFIG. 13. This flowchart is not limited to a processing by software, andit may include a processing by hardware.

When accepting print data PD (ESC/P control data) from the hostapparatus 150, the printer 10 executes this processing. Print data PD isnot limited to that from the host apparatus 150. For example, when theprinter 10 is a standalone type printer, resolution conversion (in thecase of a compressed image, such as JPEG or the like, includingdecompression), color conversion, halftoning, and the like may beinternally performed on image data (for example, RGB image data or JPEGimage data) read from an external storage medium, such as a memory cardor the like, thereby obtaining print data PD.

First, in Step S10, the command analyzing section 101 performs ESC/Panalysis (command analysis) for ESC/P control data. In this case, thecontrol codes in ESC/P control data SD are sequentially analyzed, and ifa mode transition code is present, the command analyzing section 101changes the operation mode to a mode specified by the corresponding code(that is, activates an analysis module according to the mode). Next, acommand to be analyzed in the destination mode is analyzed. For example,when the operation mode is changed to the character mode, the printcontrol command PCC is analyzed, and when the operation mode is changedto the graphic mode, print image data PGD is analyzed. When theoperation mode is changed to the remote mode, the remote command RC isanalyzed. In this case, the commands that are not to be analyzed in thedestination mode are discarded.

In Step S20, a mode when a command is analyzed is decided. If the modeis the character mode, the process progresses to Step S30, and the printcontrol command PCC is transmitted to the control section 103. If themode is the graphic mode, the process progresses to Step S40, and printimage data PGD is transmitted to the memory 102 (image buffer). If themode is the remote mode, the process progresses to Step S50, and theremote command RC is transmitted to the second printer driver 89. StepsS10 to S50 correspond to a first analysis step.

When the print control command PCC or print image data PGD istransmitted to the control section 103 or the image buffer 102, printingis performed on the roll paper R. For example, when the user operatesthe input device 162 to instruct to print a print image for colormeasurement and a color patch on the roll paper R, first, the printimage and the color patch are printed on the roll paper R. In this case,if the roll paper R is cued in the print start position, before printingis performed, the carriage 17 moves in the main scanning direction, andthe misalignment amount of the roll paper R in the paper width directionis detected on the basis of the count value of the counter 114A when thepositions of both ends of the roll paper R in the paper width directionare detected by the paper width sensor 111. The head control section 113prints the print image IG or the color patch CP at a position, which iscorrected in the paper width direction by the misalignment amount on theroll paper R. As a result, even if the roll paper R is misaligned in thepaper width direction, the print image or the color patch is accuratelyprinted at a position of the roll paper R on the logical coordinate.After the print control command or print image data is received, theremote mode transition code “MR” and the remote command RC for colormeasurement control are sent to the second printer driver 89.

In Step S60, it is determined whether or not the operation mode is putin the color measurement mode and the target device is the color meter.As shown in FIG. 7, as the result of analysis by the command analyzingsection 101, if the color measurement mode transition code “CM” ispresent in the remote command RC after the operation mode is changed tothe remote mode, the operation is changed to the color measurement mode.In this case, if the target device of the command in the colormeasurement mode is the “color meter”, the result is decided to be Yesin Step S60, and the process progresses to Step S120. If the operationmode is not the color measurement mode and the target device is not thecolor meter, the process progresses to Step S70. For example, when theoperation mode is the color measurement mode and the target device isthe color measurement driving device 80 (when the remote command RC isthe color measurement driving control command CMDC), and when theoperation mode is not the color measurement mode (when the remotecommand RC is the paper feed control command PFC or the winding controlcommand WCC), the process progresses to Step S70.

In Step S70, the coordinate calculating section 118 calculates thecoordinates. The coordinate calculating section 118 converts the valueof the logical coordinate system specified by the command into the valueof the real coordinate system. For example, on the setup screen shown inFIG. 9, the user operates the input device 162 to perform selection ofthe print image IG and layout setting, and to perform selection of thecolor patch CP and layout setting. The first printer driver 151 acquiresposition coordinate (print position coordinate) of the print image IG orthe color patch CP specified by the input device 162 by the logicalcoordinate with the upper left corner of the paper area as the origin inFIG. 9, and generates a control command having the position or amountrepresented by the logical coordinate system as the value.

For example, the color measurement control command for scan colormeasurement (FIG. 12A) and spot color measurement (FIG. 12B) stores thepatch number N and the patch column length L of the color patch CP, asshown in FIG. 8D.

In the case of spot color measurement, the carriage position coordinatecalculating section 118B calculates the color measurement positions (x1,x2, . . . , and xn) of the real coordinate system, at which the colormeasurement carriage 57 stops, from the values (X1, X2, . . . , and Xn)of the color measurement positions of N unit patches represented by thepatch column direction C. In this case, the carriage control section 114reads out the misalignment amount Δx of the roll paper R in the paperwidth direction calculated on the basis of the detection result of bothends of the roll paper R in the paper width direction by the paper widthsensor 111 regularly during printing and stored in a predeterminedstorage area of the memory 102. In this embodiment, the misalignmentamount Δx is stored as the sum of the misalignment amount Δx1 of theroll paper R in the paper width direction at the position of thecarriage 17 (specifically, the paper width sensor 111) in the transportdirection A and the misalignment amount Δx2 in the paper width directiondue to skewed movement of the roll paper R with respect to the positionof the roll paper R in the paper width direction defined by themisalignment amount Δx1 at the position of the color measuring section123 of the color meter 41 on the downstream side in the transportdirection from the carriage 17. The color measurement positions (x1, x2,. . . , and xn) in the main scanning direction B of the real coordinatesystem are calculated as (x1, x2, . . . , and xn)=(X1+Δx, X2+Δx, . . . ,and Xn+Δx). With respect to the misalignment amount Δx, the position(reference position) of the roll paper R in the paper width directionwhen the value X of the logical coordinate system becomes equal to thevalue x of the real coordinate system is represented as the misalignmentamount Δx=0. If the roll paper R is misaligned toward a side oppositethe home position with respect to the reference position, therelationship Δx>0 is established. If the roll paper R is misalignedtoward the home position, the relationship Δx<0 is established.

The paper position coordinate calculating section 118A calculates thecolor measurement positions (y1, y2, . . . , and ym) of the realcoordinate system from the color measurement positions (Y1, Y2, . . . ,and Ym) of the logical coordinate system that are the target transportpositions when color measurement is performed for the roll paper R. Forexample, it is assumed that M patch columns (in the example of FIG. 9,two patch columns) in the transport direction A are present, and thecolor measurement positions of the logical coordinate system of thepatch columns in the transport direction A are (Y1, Y2, . . . , and Ym).In this example, the color measurement positions (Y1, Y2, . . . , andYm) are represented by the value corresponding to the transport amountfrom the paper position immediately before being transported to thecolor measurement position. The real position of the roll paper R in thetransport direction A is represented by the count value of the counter115A in the paper feed control section 115. Let the count value of thepaper position immediately before being transported to the colormeasurement position be ycnt, then, the color measurement position y ofthe real coordinate system in the transport direction A is calculated asy=ycnt+Y.

In Step S80, the remote command is generated by using the value of thereal coordinate system. For example, when the roll paper R istransported to the color measurement position, the paper feed controlcommand PFCr of the real coordinate system represented by “PF(y)” isgenerated by using the value “y” of the real coordinate system obtainedby converting the logical coordinate “Y” of the paper feed controlcommand PFCt of the logical coordinate system shown in FIG. 8A.

When the color measurement carriage 57 is driven to perform spot colormeasurement by the color meter 41, the carriage position coordinatecalculating section 118B acquires the values (x1, x2, . . . , and xn) ofthe real coordinate system by converting the values (X1, X2, . . . , andXn) of the logical coordinate system in the color measurement CR drivingcommands “CCR(X1), CCR(X2), . . . , CCR(Xn)” stored in the colormeasurement driving control command CMDC of the logical coordinatesystem shown in FIG. 8C. The command generating section 117 stores thevalues (x1, x2, . . . , and xn) of the real coordinate system, andgenerates the color measurement CR driving commands of the logicalcoordinate system, which are represented by the color measurementcarriage driving commands “CCR(x1), CCR(x2), . . . , and CCR(xn)” of thereal coordinate system.

When the winding device 30 is rotated backward in synchronization withthe backward feed operation of the roll paper R after color measurementends, the command generating section 117 stores the value y of the realcoordinate system obtained through conversion of the value Y of thelogical coordinate system in the winding control command WCCt shown inFIG. 8B by the paper position coordinate calculating section 118A, andgenerates the winding control command WCCr that is represented by“PWrev(y)”.

In Step S90, it is determined whether or not the command to be analyzedis the paper feed command. If the command to be analyzed is the paperfeed command, the process progresses to Step S100, and the command istransmitted to the paper feed control section 115. If the command to beanalyzed is not the paper feed command, the process progresses to StepS110.

In Step S110, ESC/P control data is generated. after the command isgenerated (S80), the command generating section 117 makes the command(winding control command and color measurement driving control command)to be transmitted to the winding device 30 and the color measurementdriving device 80 a format of ESC/P control data.

For example, when the command is the winding control command WCCr shownin FIG. 8B, the winding control command WCCr is stored between theremote mode transition code “RM” and a remote mode end command “RME”,which are disposed between the job start command “JS” and the job endcommand “JE”, thereby generating ESC/P control data.

In the case of the color measurement driving control command CMDCr shownin FIG. 8C, the color measurement mode transition code “MC” and a colormeasurement mode end code “MCE” are disposed between the remote modetransition code “RM” and the remote mode end code “RME”, which aredisposed between the job start command “JS” and the job end command“JE”. The color measurement driving control command CMDCr is also storedbetween the color measurement mode transition code “MC” and the colormeasurement mode end code “MCE”, thereby generating ESC/P control data.

If it is determined in Step S60 that the operation mode is the colormeasurement mode and the target device is the color meter (that is, thedevice code is the color meter), in Step S120, the color measurementcommand is generated. As shown in FIG. 8D, the command “ComCM” thatinstructs to establish communication with the color meter 41 isattached, thereby generating the color measurement control command CMCr.

In Step S130, the target device is determined. That is, the targetdevice is determined from the device code in ESC/P control data. If thetarget device is the color measurement driving device 80, the processprogresses to Step S140, and communication with the color measurementdriving device 80 is established to transmit ESC/P control data to thecolor measurement driving device 80. If the target device is the colormeter 41, the process progresses to Step S150, and communication withthe color meter 41 is established to transmit the color measurementcontrol command CMCr to the color meter 41. If the target device is thewinding device 30, the process progresses to Step S160, andcommunication with the winding device 30 is established to transmitESC/P control data to the winding device 30.

In this case, communication with the target device is established inaccordance with an instruction from the second printer driver 89 by thehost communication section 81. When communication with the colormeasurement driving device 80 and the winding device 30 is established,the USB devices 82A and 84A of the color measurement driving device 80and the winding device 30 sends a response indicative of the “printerclass” (the device ID of the printer) for the request to send the deviceclass (for example, the device ID) from the USB host 81A. As a result, aUSB logical channel is connected. For this reason, in this embodiment inwhich the second printer driver 89 for controlling the optional deviceis constructed by using at least a part of the existing printer driver,which is constructed on an assumption that the other side ofcommunication is the printer, ESC/P control data can be transmitted fromthe printer 10 to the optional device through USB communication. In thisexample, the color measurement CR driving commands CCR(x1), . . . , andCCR(xn) correspond to the operation positions that are decided by anoperation position deciding unit. The command generating section 117that generates the color measurement CR driving commands CCR(x1), . . ., and CCR(xn) corresponds to the operation position deciding unit.

Next, the flow of color measurement will be described with reference toa transaction diagram of FIG. 14.

First, print data is sent from the host apparatus 150 (that is, thefirst printer driver 151) to the printer 10, and printing is instructed.For example, the image and the color patch are transmitted as printdata. The printer 10 prints the print image IG and the color patch CP onthe roll paper R on the basis of print data.

Next, the host apparatus 150 instructs color measurement. The printer 10transmits color measurement instruction data, which is received from thehost apparatus 150, to the color meter 41. As a result, the color meter41 performs initialization or setting of the color measurement conditionor the like. Subsequently, the printer 10 causes PF driving (drives thePF motor 108) to position the roll paper R at the color measurementposition in the transport direction A. Next, the printer 10 instructsthe color measurement driving device 80 to push the roll paper R and toposition the color measurement carriage 57 in the column direction C(the main scanning direction B).

In this case, the color measurement CR driving commands CCR(x1), . . . ,and CCR(xn) with the value of the real coordinate system stored areinstructed from the printer 10 through USB communication. Accordingly,in the case of spot color measurement, the color measurement carriage 57is located at the operation position with the misalignment amount Δx ofthe roll paper R in the paper width direction corrected. For thisreason, the color measurement carriage 57 can stop at a position wherethe color measuring section 123 of the color meter 41 is opposite thecenter of each unit patch D recorded at a position corresponding to thelogical coordinate on the paper.

Each time the color measurement carriage 57 stops at each operationposition, the color meter 41 performs color measurement. In this case,the second printer driver 89 sequentially receives position informationof the color measurement carriage 57 counted by the counter 125A fromthe color measurement driving device 80 on the basis of an output signalof the encoder 130 of the color measurement driving device 80, andcontrols such that the operation position of the color measurementcarriage 57 is synchronized with the color measurement position of thecolor meter 41. Each time color measurement ends for each column ofcolor patch CP, the color measurement carriage 57 returns to the homepositions, releases the push posture of the press member 44, and if anext color patch CP subject to color measurement exists, transports theroll paper R to a next color measurement position. The same processingis repeatedly performed until color measurement ends for all of thecolor patches CP.

At this moment, a color measurement progress request from the hostapparatus 150 is sequentially accepted, and the printer 10 monitors theend of color measurement of the color measurement driving device 80.Then, if a response concerning the end of color measurement is accepted,the printer 10 notifies the host apparatus 150 that color measurementends. The host apparatus 150 that accepts the end of color measurementrequests the printer 10 to send the color measurement result. When thishappens, the printer 10 sends a color measurement result request to thecolor meter 41. The color meter 41 that accepts the color measurementresult request sends the color measurement result (color measurementdata) to the host apparatus 150 through the printer 10. When acceptingthe color measurement result, the host apparatus 150 sends a paperpositioning instruction to the printer, and the printer 10 causes PFbackward rotation (drives the PF motor 108 to rotate backward) toperform paper positioning (back feed operation) in response to theinstruction, and sends a backward rotation instruction to the windingdevice 30 in synchronization with the backward rotation of the PF motor108. As a result, the winding device 30 is driven to rotate backward insynchronization with PF backward rotation, and accordingly the rollpaper R is fed backward to a predetermined position. For example, theroll paper R is disposed at a print start position of a next page. Thehost apparatus 150 decides pertinence of a color printed on the basis ofthe color measurement result, and decides a color condition at the timeof printing.

As described above in detail, according to this embodiment, thefollowing effects are obtained.

(1) The printer class is set with respect to the color measurementdriving device 80 and the winding device 30 that are optional devices ofthe printer 10. Therefore, USB communication can be established whenESC/P control data, which is a print command, is transmitted from theprinter 10 to the optional device. As a result, the optional device canbe driven and controlled by using the remote command of ESC/P controldata.

(2) The optional device can be driven and controlled by using ESC/Pcontrol data. Therefore, the second printer driver 89 can be constructedby using the existing first printer driver 151, and the commandanalyzing sections 124 and 131 in the optional devices can beconstructed by using an existing ESC/P analyzing section. For example,only if a circuit board for the existing ESC/P analyzing section ismounted on the optional devices, the command analyzing sections 124 and131 can be constructed, and it is not necessary to newly develop andmanufacture an exclusive-use analyzing section. As a result, the printersystem 100 can be developed and manufactured within a short period oftime.

(3) The misalignment amount Δx3 of the roll paper R in the paper widthdirection from the reference position is acquired on the basis of thedetection result of the paper width sensor 111 and stored in the memory102. The value of the logical coordinate system is converted into thevalue of the real coordinate system with the misalignment amount of theroll paper R in the paper width direction added by using themisalignment amount Δx3. The operation position of the color measurementcarriage 57 (mobile) of the color measuring device 40 serving as thesecond device is controlled on the basis of second control dataincluding the command specified by the value of the real coordinatesystem. As a result, even if the roll paper R is misaligned in the paperwidth direction, color measurement can be accurately performed for eachunit patch D of the color patch CP recorded at a position correspondingto the logical coordinate on the roll paper R.

(4) By using the misalignment amount Δx3 that is the sum of themisalignment amount Δx1 of the roll paper R in the paper width directionand the misalignment amount Δx2 in the paper width direction due toskewed movement of the roll paper R, second control data is generated inwhich the value for deciding the operation position of the colormeasurement carriage 57 of the color measuring device 40 is specified asthe value of the real coordinate system for compensating themisalignment amount Δx3. Therefore, even if the paper width sensor 111and the color measurement carriage 57 are disposed at differentpositions in the transport direction, the operation position of thecolor measurement carriage 57 can be accurately controlled to the unitpatch D, and as a result, color measurement accuracy of the colormeasuring device 40 can be increased.

(5) The winding device 30 is driven to rotate backward insynchronization with the backward feed operation. For this reason, aftercolor measurement ends, the roll paper R can return from the colormeasurement position to the print start position of the next page.Therefore, even if the winding device 30 is provided as an optionaldevice, the winding device 30 can be driven to rotate backward by usingESC/P control data, and as a result, the winding device 30 can becontrolled with simple configuration.

(6) In the related art, in order to recreate a command based onmisalignment information of the roll paper R obtained by the printer,the misalignment information is transmitted to the printer driver of thehost apparatus once, and the printer driver generates the command of thereal coordinate system by using the misalignment information. For thisreason, it is necessary to configure the printer 10 to receive themisalignment information. In contrast, in this embodiment, the printer10 is provided with the second printer driver 89 having a printer driverfunction. For this reason, the printer internally generates the commandof the real coordinate system, without sending misalignment informationobtained by the printer 10 to the host apparatus 150. When the commandis generated and transmitted to the color measurement driving device 80serving as the second device, print data (ESC/P control data) in whichthe command is incorporated as the remote command RC is generated andtransmitted to the color measurement driving device 80 as print data byusing the printer driver function (communication function). In thiscase, the value of the command is subject to coordinate conversion, andthus the command for printing (remote command) can be used as it is.Therefore, operation delay of the second device due to exchange of datatransmitting misalignment information to the host apparatus 150 isdifficult to occur. In addition, the printer system 100 (electronicdevice system) can be constructed with simple configuration byincorporating the printer driver function and the ESC/P analyzingsection for printing into the printer 10 and the color measurementdriving device 80 (second device), respectively.

Second Embodiment

Hereinafter, a second embodiment of the invention will be described withreference to FIGS. 15 to 25.

FIG. 15 is a block diagram showing the electrical configuration of aprinting system including printer systems 100 according to the secondembodiment of the invention. A plurality of printer system 100 have thesame configuration, and thus only one printer system 100 is shown in thedrawing.

Similarly to the first embodiment, a printing system 200 includesprinter systems 100 and a host apparatus 150 communicably connected tothe printer system 100. The host apparatus 150 includes, for example, apersonal computer or the like. The host apparatus 150 is provided with,for example, a first printer driver 151 (host driver), which isconstructed by installing software for a printer driver. A communicationsection 152 of the host apparatus 150 is connected to a communicationsection 74 of the printer 10 constituting each printer system 100through a communication cable. Communication between the communicationsections 152 and 74 is based on, for example, IEEE 1284.4 communicationor USB communication. In this embodiment, the first printer driver 151constitutes a host control section and a host control device.

A plurality of printer systems 100 are communicably connected to thehost apparatus 150. The host apparatus 150 and a plurality of printersystems 100 are connected to a management server 300 through a network250, such as Internet or the like. The management server 300 accessesthe printer systems 100 to acquire information necessary for maintenanceor an accounting system.

The color measuring device 40 is divided into a color meter 41 and acolor measurement driving device 80 constituting a driving system of apress member 44 and a color measurement carriage 57. A communicationsection 81 of the printer 10 is communicably connected to communicationsections 82 to 84 of the color meter 41, the color measurement drivingdevice 80, and a winding device 30 through a hub 85. Communicationbetween the communication section 81 and the communication sections 82to 84 is based on, for example, USB communication. In this case, thecommunication section 81 constitutes a USB host, and the communicationsections 82 to 84 constitute USB devices. In this embodiment, theprinter 10 constitutes a first device, and the color measuring device 40constitutes a second device.

When an image displayed on the monitor 150 a is printed, the firstprinter driver 151 in the host apparatus 150 generates print job data ofthe image and transmits print job data to the printer 10. As a printcommand of print job data, for example, ESC/P (Epson Standard Code forPrinter), which is the standard command of the serial printer, is used.

The printer 10 is provided with a command analyzing section 101analyzing print job data, a buffer memory (hereinafter, referred to as“image buffer 102”), a control section 103, a second printer driver 89,a print engine 95, and a memory 171 for recording job information(described below) or the like. In this embodiment, the memory 102 isused as an image buffer storing print image data. For this reason, dataof calculation results in the printer 10 is stored in a predeterminedstorage area of a RAM 173 described below or the nonvolatile memory 171.

The command analyzing section 101 analyzes print job data, if it isprint image data, and temporarily stores print job data in the imagebuffer 102. If print job data is a print control command that instructsprinting, the command analyzing section 101 sends print job data to thecontrol section 103. If print job data is a remote command thatinstructs control other than printing, the command analyzing section 101sends print job data to the second printer driver 89. The controlsection 103 drives the print engine 95 in accordance with the printcontrol command, and prints an image based on print image data. Thesecond printer driver 89 transmits the remote command to control thecolor meter 41, the color measurement driving device 80, and the windingdevice 30. The control section 103 manages the status of the printengine 95, and stores job information, such as ink consumption or paperconsumption in the memory 171. The job information is data that isacquired by the management server 300 through an access to the printer100 and used for a maintenance service or an accounting system. Data,such as the temperature of the recording head or information formaintenance control, which is used to control the printer 10, is alsostored in the memory 171.

FIG. 16 is a block diagram showing the detailed electrical configurationof the printing system. The host apparatus 150 includes the firstprinter driver 151, a color measurement driver 153, and an application154 for image display. The first printer driver 151 and the colormeasurement driver 153 are constructed by installing a program on thehost apparatus 150.

The first printer driver 151 includes a print data generating section(hereinafter, referred to as “job data generating section 155”)generating print data (hereinafter, referred to as “print job data”), ahost control section 156, a deciding section 158, and a data storagesection 157. The job data generating section 155 includes a logicalcoordinate calculating section 159, a command generating section 160,and an image data processing section 161. An input device 162 isconnected to the host apparatus 150. The input device includes, forexample, a keyboard, a mouse, or the like.

The color measurement driver 153 has a setup screen display function todisplay a setup screen for color measurement setup, a color patchpattern setup function, and a color patch print position setup function.The color measurement driver 153 has a function to display a paper rangeincluding an image displayed by the application 154 on the setup screen,and to set a color patch while selecting desired color patch pattern andprint position in a desired area within the paper range.

FIG. 17 schematically shows a setup screen for color measurement that isdisplayed on the monitor 150 a by the color measurement driver 153. Theuser can operate the input device 162 to display the print image IG onthe setup screen 140 for color measurement, and also to select a colorpattern of a color patch CP and set the position of the color patch CP.For example, the user selects a desired pattern, the number of colors,color, the number of color patch columns, and the like on a color patchselection window, a pull-down menu, or the like, and specifies the printposition of the selected color patch CP with a mouse, for example, toset the color patch CP at a desired position, such as a blank areahaving no print image IG. The print position of the color patchspecified on the setup screen 140 for color measurement is acquired bythe color measurement driver 153 as a logical coordinate which is acoordinate system set on the paper area. Specifically, as shown in FIG.17, the logical coordinate system is represented by the relativecoordinate with the upper left corner of the paper area (the entirerange corresponding to one page) as the origin (0,0) and the X and Ycoordinates in the paper width direction (the main scanning direction B)(the right direction in FIG. 17) and the direction opposite thetransport direction (the down direction in FIG. 17). For example, asshown in FIG. 17, with respect to the print image IG, the upper leftcorner is represented by the coordinate (Xps,Yps), and the lower rightcorner is represented by the coordinate (Xpe,Ype).

Each of the color patches CP includes the patch column PR havingarranged a plurality of unit patches D in columns, and the startposition mark MS and the end position mark ME disposed at apredetermined interval on both sides of the patch column PR in thecolumn direction. In the example of FIG. 17 where two columns of colorpatches CP are arranged, the color patches CP are represented by thevalues of the Y coordinates Y1 and Y2 and the X coordinates (X1, X2, . .. , Xn−1, and Xn) concerning N unit patches D constituting each patchcolumn PR. The logical coordinate values concerning the color patches CPare used to decide the color measurement point when the color meter 41performs color measurement for the unit patches D. The coordinate ofeach unit patch D represents, for example, the center point of each unitpatch D.

For example, the Y coordinate value of the color patch CP is used as atarget position when the roll paper R is fed to position at a colormeasurement position. The X coordinate value of each unit patch D isused as a target position when the color measurement carriage 57 ispositioned in the patch column direction C such that the colormeasurement point of the color meter 41 is aligned with the center pointof each unit patch. Data concerning the color patch CP acquired by thecolor measurement driver 153 includes information concerning the patchcolumn length L and the patch number N of the patch column PR.

As shown in FIG. 17, a label print setup button 141 is provided on thesetup screen 140 for color measurement. The label print setup button 141is used to set printing of a decision result concerning pertinence of acolor condition based on the color measurement result of the color meter41. If the user operates (clicks) the mouse or the like, a plurality ofimages for printing of the decision result are displayed. Then, the userselects a desired one from among the images to set an image for printingof the decision result. For example, an image having a character string“OK!” and the like are prepared. In this embodiment, if an image forprinting of the decision result is selected, the print position of theselected image is automatically set within the blank area so as not tooverlap the image of the paper area.

The print image IG, image data of the color patch CP, logical coordinatedata, and information concerning the patch column length L and the patchnumber N of the color patch CP are sent from the color measurementdriver 153 shown in FIG. 16 to the first printer driver 151. In FIG. 17,the Y coordinate “Yc” representing the end (in the drawings, the lowerend) of the paper area in the transport direction A is used to decidethe cut position when the roll paper R is cut with the cutter (notshown) or the target position of the roll paper R so as to be cued inthe print start position of the next page. The color measurement driver153 generates the color measurement command to control the color meter41 and sends the color measurement command to the first printer driver151.

The first printer driver 151 shown in FIG. 16 generates print job dataincluding a print command on the basis of an image displayed on themonitor 150 a by the application 154, image data of the color patch CPset by the color measurement driver 153, logical coordinate data, andthe like. In this embodiment, the control commands for control of thewinding device 30, the color meter 41, and the color measurement drivingdevice 80, as well as printing control of the printer 10, areincorporated into print job data. The first printer driver 151 generatesprint job data by using the logical coordinate calculating section 159,the command generating section 160, and the image data processingsection 161 described above.

The command generating section 160 generates a command by using theprinter description language (printer control code). In this embodiment,as described above, an ESC/P command is used as the printer descriptionlanguage for the serial printer. Of course, if the printer 10 is a pageprinter, ESC/page may be used as the printer description language. Theprocessing of the command generating section 160 will be described belowin detail.

The logical coordinate calculating section 159 calculates a value to bestored in a command created by the command generating section 160 on thebasis the logical coordinate information defining the print area of theprint image IG or the color patch CP set on the setup screen 140 forcolor measurement or logical coordinate information concerning thelogical coordinate of the color measurement point of the color patch CPor the like. Examples of the value to be calculated include the paperfeed amount to the print position of the print image or the color patchCP, the paper feed amount to the color measurement position where thecolor meter 41 can perform color measurement for the color patch CP, theoperation position (the color measurement position in the patch columndirection C), which is the movement target position (color measurementposition) of the color measurement carriage 57 at the time of colormeasurement. The values are calculated as the values, such as the driveamount or the target position of a motor to be controlled and the like.

The image data processing section 161 converts image data for displayinto image data for printing. Specific examples include resolutionconversion to convert display resolution into printer resolution, colorconversion to convert image data from the RGB color system to the CMYKcolor system (respective colors of cyan, magenta, yellow, and black)that can be expressed by the printer 10, halftoning to change thegray-scale value of image data to a gray-scale value that can beexpressed by the printer, data output sequence adjustment (for example,micro weave) to rearrange the output sequence of data to the recordinghead 19 in accordance with the ink droplet ejection sequence based on aprint mode, and the like. Color conversion is performed by using a colorconversion table. With respect to halftoning, a known method, such asso-called error diffusion, dithering, or the like, may be used. Thecontents of such processing are known, and thus further descriptionswill be omitted. Image data that is subjected to an image processing forprinting is called print image data.

The first printer driver 151 has a function to display a setup screenfor input and setup of a print condition on the monitor 150 a of thehost apparatus 150. The user can operate the input device 162 on thesetup screen to set the print condition. The print condition includespaper type, paper size, color/monochrome, layout (set margin, print withno border, and the like), print mode (for example, high-quality printmode, high-speed print mode, and the like), and the like. Imageprocessing, such as resolution conversion, color conversion, halftoning,data output sequence adjustment, and the like, is performed inaccordance with the print condition.

The host control section 156 undertakes control in the first printerdriver 151, and performs instruction for generation of print job data tothe respective sections 159 to 161, display control on the printcondition setup screen, communication control (transmission instruction)for transmission of print job data to the printer 10, decision ofpertinence of the color condition on the basis of color measurement datafrom the color meter 41, setting of the color correction value, and thelike. The data storage section 157 is a data storage area thattemporarily stores various kinds of data concerning the colormeasurement condition or the print condition set on the setup screen(the setup screen for color measurement and the print condition setupscreen), temporarily stores generated print job data or the like beforebeing transmitted, temporarily stores color measurement data receivedfrom the color meter 41 before decision or an arithmetic operation, orstores a plurality of kinds of image data to be selected for labelprint. For the data storage section 157, for example, a predeterminedstorage area of the memory of the host apparatus 150 is used. If the jobdata generating section 155 generates print job data, the host controlsection 156 instructs the communication section 152 to transmit printjob data to the printer 10, and the communication section 152 transmitsprint job data stored in the data storage section 157 to thecommunication section 74 of the printer 10 in accordance with apredetermined communication protocol.

The deciding section 158 compares the color of the print result (thecolor patch CP) with the color of the monitor display screen on thebasis of the color measurement result (color measurement data)transmitted from the color meter 41 and received by the host controlsection 156 through the printer 10, and decides pertinence of the printcondition concerning the color. In this embodiment, for example, theresult is decided to be “OK”! or “NG”.

When the color meter 41 performs color measurement for the color patchCP, the host control section 156 requests the color measurement result(color measurement data) for the color meter 41, or instructs the jobdata generating section 155 to generate print image data for label printand to transmit print image data, and to store job information (jobinformation concerning color measurement) obtained from colormeasurement data or the color measurement decision result.

The first printer driver 151 (the job data generating section 155)generates print job data (ESC/P control data) including various commandsgenerated by the command generating section 160 and print image datagenerated by the image data processing section 161.

The structure of print job data that is generated by the first printerdriver 151 will be described. FIG. 18 shows the structure of print jobdata PD that is generated by the first printer driver 151. In thefollowing description, a symbol representing a command is notinterpreted to match with a real print command, and for convenience ofexplanation, a simple symbol is used. As shown in FIG. 18, print jobdata PD (hereinafter, also referred to as “print data”) has a header HDand a body BD. In the header HD, header information, such as the datasize of the body BD and the like, is described. In the body BD, ESC/Pcontrol data SD described with a print command (in this example,“ESC/P”) is stored. FIG. 18 shows, for example, print job data whenprinting for color measurement, color measurement, color measurementdecision, and label print are performed.

As shown in FIG. 18, ESC/P control data SD has a data structure in whichvarious control command or control codes, print image data, and the likeare stored between the job start code “JS” and the job end code “JE”.FIG. 18 shows a state where almost all kinds of commands or data thatcan be stored as data is stored, but actually, some commands or data ofthem is stored to constitute print data. That is, as shown in FIG. 18,ESC/P control data SD includes, between the codes “JS” and “JE”, a printcontrol command PCC, print image data PGD, paper feed control commandsPFC1 to PFC3, winding control commands WCC1 to WCC3, a color measurementdriving control command CMDC, a color measurement control command CMC, alabel print command LPC, a label print data LPD, a job informationstorage command JMC, a color measurement associated data CMD, and thelike. Actually, the packets, in which some commands or data are stored,are rotated and transmitted multiple times due to different transmissiontiming. In this case, the job start code “JS” is stored in a packet tobe initially transferred constituting one job, and the job end code “JE”is stored in a packet to be finally transferred during the job.

In ESC/P control data SD, the control commands or print image data isdivided and stored in time series for a plurality of modes. As themodes, the character mode, the graphic mode, and the remote mode areprepared. In ESC/P control data SD, the control codes for transition tothe respective modes, that is, the character mode transition code “MC”,the graphic mode transition code “MG”, and the remote mode transitioncode “MR” are incorporated. Subsequent to each mode transition code, acommand to be analyzed in the corresponding mode is stored. Thecharacter mode and the graphic mode are modes in which a commandconcerning printing control is analyzed, and the remote mode is a modein which commands for control other than printing control, for example,commands for color measurement control or winding control, andmaintenance control (cleaning system control) are analyzed. Thecharacter mode is a mode for analyzing a text code (character code), andthe graphic mode is a mode for analyzing image data.

As shown in FIG. 18, when printing for color measurement, colormeasurement, color measurement decision, and label print are performed,in print job data, the job start command “JS”, the character modetransition code “MC”, the print control command PCC, the graphic modetransition code “MG”, and print image data PGD (head control data) arestored in that order. In this example, a case in which a print imageincluding text (document) and an image is printed.

The remote command RC is stored subsequent to the remote mode transitioncode “MR”. The remote command RC is a command that can be stored inESC/P control data in order to cause the printer 10 to perform controlother than printing control. In this example, control, such as paperfeed to the color measurement position after printing for colormeasurement, driving of the color measurement carriage 57 and the colormeter 41, paper feed to the label print position, storage instruction ofjob information after label print, paper feed to the next targetposition after label print, and the like, is performed by using theremote command RC. The remote command RC is originally provided to drivea maintenance device (not shown) for nozzle cleaning of the recordinghead 19, or to perform driving control of a maintenance system tosuppress nozzle clogging during printing through idle ejection(flushing) of ink droplets to a waste liquid section.

In this embodiment, the remote command RC is used to control the colormeasuring device 40 and the winding device 30. As shown in FIG. 18, thepaper feed control command PFC1 and the winding control command WCC1subsequent to the remote mode transition code “MR” are commands that areused to transport the roll paper R to the color measurement position.The color measurement position indicates the position of the roll paperR in the transport direction A where the color patch CP on the rollpaper R can be aligned with the optical spot for color measurement ofthe color meter 41 in the transport direction A.

The color measurement driving control command CMDC and the colormeasurement control command CMC subsequent to the color measurement modetransition code “CM” are commands that are used to perform drivingcontrol of the color measurement driving device 80 and the color meter41. The color measurement driving device 80 controls the paper pushmotor 71 of the color measuring device 40 and the color measurementcarriage motor 60 in accordance with the color measurement drivingcontrol command CMDC.

The label print command LPC subsequent to a color measurement resultrequest code RD is a command that is used to instruct label print. Thepaper feed control command PFC2 and the winding control command WCC2 arecommands that are used to transport the roll paper R to the label printposition. Label print data LPD subsequent to the graphic mode transitioncode MG is image data for label print to be printed by the printer 10.Of course, label print data may be text data including character codes.

The job information storage command JMC subsequent to the remote modetransition code MR is a command that is used to instruct the printer 10to store job information. Next, color measurement associated data CMD iscolor measurement associated data to be stored in the printer 10 as jobinformation. Color measurement associated data CMD is generated by thefirst printer driver 151 on the basis of color measurement data from thecolor meter 41. Color measurement associated data CMD includes, forexample, the number of times of color measurement, color measurementfrequency, color measurement condition, color measurement decisionresult, and the like. The job information storage command JMC alsoinstructs to store other kinds of job information, such as inkconsumption or paper consumption to be managed by the printer 10. Next,the paper feed control command PFC3 and the winding control command WCC3are commands that are used to transport the roll paper R to the printstart position of the next page or a cut position by an automatic cuttermachine (not shown) after label print. In addition, a cleaning command(not shown), a flushing command (not shown), and the like are stored.

The winding control commands WCC1 to WCC3 are commands that are used todrive the winding motor 32 of the winding device 30 to rotate backwardin synchronization with backward rotation of the transport roller 21 andthe paper discharge roller 22 when the roll paper R is fed backward. Forthis reason, the winding control commands WCC1 to WCC3 are omitted whenthe transport direction of the roll paper R is a forward feed direction.The color measurement control command CMC is a command that is used tocontrol the color meter 41, and is described with control codes used bythe color meter manufacturer. The color measurement control command CMCmay be sent from the color measurement driver 153. Though not shown inFIG. 18, a mode end code (not shown) is stored at the end of the commandfor each mode.

During printing for color measurement, color measurement, label print,job information storage instruction, or the like, if it comes to thetransmission timing, the host control section 156 transmits a command ordata in print data PD shown in FIG. 18. For this reason, the hostcontrol section 156 has a functional section to perform printing forcolor measurement, color measurement, label print, job informationstorage instruction, or the like.

FIG. 19 is a block diagram showing the configuration of a main controlsection. As shown in FIG. 19, the host control section 156 includes ajob start command transmitting section 181 serving as a job startnotifying section, a first command section 182, a label print commandsection 182A, a determining section 183, a second command section 184, ajob information generating section 185, a job information transmittingsection 186, and a job end command transmitting section 187 serving as ajob end notifying section. The host control section 156 activates thosesections as occasion demands.

The job start command transmitting section 181 transmits the job startcommand “JS” to the printer 10 when a job starts. The first commandsection 182 is activated during normal printing and printing for colormeasurement, and transmits the print control command PCC and print imagedata PGD to the printer 10, thereby instructing printing. The firstcommand section 182 includes the label print command section 182A thatis activated at the time of label print. The label print command section182A transmits the commands PFC2 and WCC2 for the paper feed system,which are used to transport the roll paper R to the label printposition, and the commands LPC and LPD, which are used to execute labelprint, to the printer 10, thereby instructing label print.

The determining section 183 determines presence/absence of settings forcolor measurement. For example, information (for example, a flag or thelike) indicating that the user sets the color patch CP on the setupscreen 140 shown in FIG. 17 and instructs printing for color measurementis stored in the memory. The determining section 183 determinespresence/absence of color measurement to be executed on the basis of theinformation. If there is no color measurement to be executed, thedetermining section 183 notifies the job end command transmittingsection 187 that there is no color measurement to be executed, and theprint job ends. If there is color measurement to be executed, thedetermining section 183 notifies the second command section 184 thatthere is color measurement to be executed.

The second command section 184 instructs the printer 10 to perform colormeasurement on the basis of the notification from the determiningsection 183. That is, the second command section 174 transmits thecommands PFC1 and WCC1 for the paper feed system, which are used totransport the roll paper R to the color measurement position, and thecommands CMDC and CMC for the color measurement system, which are usedto cause the color measuring device 40 to perform color measurement.

The job information generating section 185 generates color measurementassociated data CMD to be stored in the printer 10 as job information byusing color measurement data acquired from the color measuring device 40and color measurement result decision information of the decidingsection 158. Color measurement associate data includes, for example,information that is effective to give an advice concerning colormeasurement, such as color measurement frequency, color measurementcondition, color measurement decision result, or the like, to theprinter user.

The job information transmitting section 186 transmits color measurementassociated data CMD generated by the job information generating section185 to the printer 10 as job information, together with the command JMCfor storing the color measurement associated data CMD. In thisembodiment, the job information generating section 185 and the jobinformation transmitting section 186 constitute a job informationstorage instruction section.

The determining section 183 determines presence/absence of settings oflabel print. For example, information (for example, a flag or the like)indicating that the user operates the label print setup button 141 onthe setup screen 140 for color measurement shown in FIG. 17 andinstructs label print is stored in the memory. The determining section183 determines presence/absence of label print to be executed on thebasis of the information. If there is no label print to be executed, thedetermining section 183 notifies the job end command transmittingsection 187 that there is no label print to be executed, and the printjob ends. If there is label print to be executed, the determiningsection 183 notifies the label print command section 182A of the firstcommand section 182 that there is label print to be executed. The labelprint command section 182A instructs label print on the basis of thenotification from the determining section 183.

When the print job ends, the job end command transmitting section 187transmits the job end command “JE” to the printer 10. Until the job endcommand “JE” is received, the printer 10 maintains communicationconnection to the host apparatus 150, and inhibits an interrupt from adifferent host apparatus. The job end command “JE” may be transmittedafter normal printing ends with no color measurement subsequent toprinting, or after job information storage instruction based on colormeasurement associated data. In this embodiment, after final printingends during the job, the host control section 156 transports the rollpaper R to a predetermined position, such as the print start position ofthe next page or the roll paper cut position, and transmits the commandsPFC3 and WCC3 for the paper feed system to the printer 10. For thisreason, when the final operation of the job is printing, after thecommands PFC3 and WCC3 for the paper feed system are transmitted, thejob end command “JE” is transmitted.

Returning to FIG. 16, the electrical configuration of the printer system100 will be described. As described above, the printer system 100includes the printer 10, the winding device 30, and the color measuringdevice 40. The color measuring device 40 includes the color measurementdriving device 80 and the color meter 41.

The communication section 81 of the printer 10 is connected to thecommunication sections 82 to 84 of the three devices 30, 41, and 80(optional device) through the hub 85 and the three communication cables86 to 88. In this example, USB communication is performed between theprinter 10 and the optional devices. The communication section 82 isformed by a USB host, and the communication sections 82 to 84 are formedby USB devices.

The printer 10 includes a command analyzing section 101, an image buffer102, a control section 103, a second printer driver 89, a nonvolatilememory 171, a RAM 173, driving circuits 104 to 106, a recording head 19,a CR motor 107, a PF motor 108, an encoder 109, a paper detection sensor110, a paper width sensor 111, and a linear encoder 112.

The command analyzing section 101 analyzes print data (ESC/P controldata) receives from the first printer driver 151 of the host apparatus150. If a mode transition code is present in print data, the commandanalyzing section 101 changes the operation mode to a mode specified bythe corresponding code (that is, activates an analysis module accordingto the mode). There are three modes of the character mode, the graphicmode, and the remote mode. A command to be analyzed is decided for eachmode, and only a command to be analyzed is analyzed and sent to adestination according to the mode. For example, if the operation mode isthe character mode, the print control command PCC (see FIG. 18) isanalyzed and sent to the control section 103. If the operation mode isthe graphic mode, print image data PGD (see FIG. 18) is analyzed andsent to the image buffer 102. If the operation mode is the remote mode,the remote command RC (see FIG. 8) is analyzed and sent to the secondprinter driver 89. In this case, the commands other than a command to beanalyzed for each mode are discarded.

The control section 103 controls the print engine 95 (see FIG. 4) thatincludes the recording head 19, the CR motor 107, and the PF motor 108.The control section 103 has a function to calculate the label printposition where label print of the decision result based on colormeasurement data of the color meter 41 is performed, a function tomeasure and calculate ink consumption and paper consumption, and afunction to store job information in a job information storage section172 of the nonvolatile memory 171. To this end, the control section 103includes a head control section 113, a carriage control section 114, apaper feed control section 115, a label print position calculatingsection 175, an ink consumption arithmetic section 176, and paperconsumption count section 177.

The second printer driver 89 undertakes control other than printingcontrol, and in addition to cleaning system control or idle ejection(flushing) control of the printer 10, controls the color meter 41, thecolor measurement driving device 80, and the winding device 30 throughcommunication. If the accepted remote command RC is a command that isused to control the color measurement driving device 80 and the windingdevice 30, the second printer driver 89 generates print data, in whichthe command is incorporated as the remote command, and transmits printdata to control the color measurement driving device 80 and the windingdevice 30. For this reason, the second printer driver 89 of thisembodiment is a simple printer driver and, similarly to the firstprinter driver 151, has a function to generate ESC/P control data SDdescribed with the print command (ESC/P) to generate print data PD withESC/P control data SD in the body BD. The second printer driver 89 isconstructed to have some of the functions of the first printer driver151 by using the first printer driver 151. The second printer driver 89includes a remote command analyzing section 116, a command generatingsection 117, and a coordinate calculating section 118. That is, the samerelationship as that between the first printer driver 151 and theprinter 10 is established between the second printer driver 89, thecolor measurement driving device 80, and the winding device 30.

The command analyzing section 101, the control section 103, and thesecond printer driver 89 include, for example, a CPU, an ASIC(Application Specific IC), a ROM, a RAM, and the like. In this example,the command analyzing section 101 is formed by hardware, for example, anASIC, and the control section 103 and the second printer driver 89 areformed by software, which is implemented by a program stored in the ROMto be executed on the CPU. Of course, all of them may be formed bysoftware, hardware, such as an integrated circuit (for example, a customIC including an ASIC or the like), or a combination of software andhardware (in this case, an arbitrary combination may be selected).

The command analyzing section 101 analyzes print data PD (ESC/P controldata SD) shown in FIG. 18. For example, if the character mode transitioncode MC is present, the command analyzing section 101 changes theoperation mode to the character mode, and analyzes the print controlcommand PCC (see FIG. 18). As the result of analysis, if the printcontrol command PCC (for example, including a character code, such asASCII code or the like) is present, the print control command PCC issent to the control section 103. The control section 103 generates imagedata from the character code by using the character generator (notshown), and stores image data in the image buffer 102. The head controlsection 113 drives the recording head 19 in synchronization with an inkejection timing signal based on image data (raster data) read from theimage buffer 102 by one pass (the drive amount of the carriage 17 in themain scanning direction B every time), and ejects ink droplets from thenozzles of the recording head 19 with a predetermined timing while thecarriage 17 is traveling in the main scanning direction B. The controlsection 103 sends a carriage drive command (hereinafter, referred to as“CR drive command”) to the carriage control section 114, and sends apaper feed command to the paper feed control section 115.

Meanwhile, if the graphic mode transition code MG is present, thecommand analyzing section 101 changes the operation mode to the graphicmode, and analyzes print image data PGD (see FIG. 18). As the result ofanalysis, if print image data PGD (including label print data LPD) ispresent, print image data PGD is sent to the image buffer 102. Thecontrol section 103 calculates a start position and a stop positionduring one pass of the carriage 17 based on print image data PGD readfrom the image buffer 102 by one pass. Then, if a carriage activationtime for a next pass comes, the control section 103 sends the CR drivecommand to the carriage control section 114, and instructs to activatethe carriage 17. If a paper feed start time comes after printing in theprevious pass ends, the control section 103 sends the paper feed commandto the paper feed control section 115, and instructs a paper feedoperation. The paper feed operation used herein includes a paper feedoperation, a paper feed operation during printing (narrow sense), and apaper discharge operation.

The paper feed control section 115 drives the PF motor 108 through thedriving circuit 106 on the paper feed command and feeds the roll paper Rby the amount as instructed. If the roll paper R is sent to a next printposition, the carriage control section 114 drives the CR motor 107through the driving circuit 105 on the basis of the CR drive command,and operates the recording head 19 in the main scanning direction B byone pass. During one pass, the head control section 113 drives therecording head 19 through the driving circuit 104 on the basis of printimage data PGD. Then, ink droplets are ejected from the nozzles of therecording head 19, printing (recording) for one raster is performed onthe basis of print image data PGD.

The recording head 19 is provided with an ejection driving element foreach nozzle. If the ejection driving element is driven by an applicationvoltage of a predetermined waveform, ink droplets are ejected from thenozzles. As the ejection driving element, a piezoelectric vibratingelement or an electrostatic driving element may be used. In addition, aheater for ink heating may be used. In this case, ink is film-boiled,and ink droplets are ejected from the nozzles by expansion of bubbles inthe ink flow channel communicating with the nozzles.

The label print position calculating section 175 calculates the position(label print position) where the label of the decision result based onthe color measurement result by the color measuring device 40 isprinted. In the related art, when the color measurement decision resultis OK, the user manually attaches a label indicative of “OK”. Incontrast, a label indicative of “OK” is printed. In this case, the labelprint position corresponding to the color patch CP is automaticallycalculated. In order to automatically calculate the label printposition, the label print position calculating section 175 includes ablank space region detecting section 175A, a print size calculatingsection 175B, and a print position calculating section 175C shown inFIG. 20. Automatic calculation is performed as follows. First, a blankspace region excluding the print regions of the print image IG and thecolor patch CP (see FIG. 21A) is detected within the paper area. A labelprint area is set at a position corresponding to the color patch CPwithin the blank space region size. When the label print area isdecided, the label print size and position are decided under theconditions: (1) the blank space region equal to or less than apredetermined percent (%) (a predetermined percent (%) less than 100%and in a range of 30 to 90%), (2) the size according to the paper size,(3) the position corresponding to the color patch CP.

In this example, in deciding the label print area, first, the blankspace region detecting section 175A detects the blank space regionexcluding the print image IG and the color patch CP shown in FIG. 21Awithin the paper area (when a margin is set in the paper edge portion, aprintable area excluding the margin). In this example, the coordinatesof the print image IG and the color patch CP are acquired from printdata received from the first printer driver 151, or obtained from thecount value of the counter 115A when the user wants to print an objectto be printed (the print image IG or the color patch CP) whileidentifying the object to be printed or information concerning theejection start position and ejection end position calculated by the headcontrol section 113, and stored in the RAM 173. Meanwhile, thecoordinates of the print image IG and the color patch CP are stored inthe RAM 173 after being converted into the coordinates of the realcoordinate system. The blank space region detecting section 175Acalculates the coordinates of the rectangular blank space regionadjacent to the color patch CP in four directions (up, down, left, andright directions) within the printable area on the basis of thecoordinates stored in the RAM 173.

In this example, a decision result image is set so as to bepreferentially disposed nearby the color patch CP in the patch columndirection (in FIG. 21A, the left-right direction) rather than to bedisposed nearby the color patch CP in a direction (in FIG. 21A, theup-down direction) perpendicular to the patch column direction. That is,only when the decision result image cannot be disposed nearby the colorpatch CP in the patch column direction, the decision result image isdisposed nearby the color patch CP in the direction perpendicular to thepatch column. When a plurality of print images are printed and the colorpatch CP is printed for each print image, the decision result images tobe attached to a plurality of color patches CP are preferentiallyarranged in order. For this reason, the widest rectangular blank spaceregion is not used, but a rectangular blank space region is decided onthe basis of the priority of the arrangement direction with respect tothe color patch CP and the space of the rectangular blank space region.Of course, the user may specify the arrangement direction nearby thecolor patch CP on the setup screen with the mouse or the like.

The print size calculating section 175B first calculates a rectangularregion, in which the shape (in FIG. 21B, a rectangle) of the decisionresult image (for example, an image “OK” shown in FIG. 21B) isinscribed, within the area of the predetermined percent (%) inside theblank space region size. The size of the calculated rectangular region(rectangular region size) is reduced as occasion demands to have apredetermined size with respect to the paper size. In this case, whenthe rectangular region size is equal to or less than the predeterminedsize with respect to the paper size, the rectangular region size is notreduced. In this way, the print size is calculated by the lengths Lx andLy of two sides in the horizontal and vertical directions. Of course,the print size may be calculated by the coordinates (xs1,ys1) and(xs2,ys2) of two diagonally opposing points in the rectangular region.Any numeric data may be used insofar as the print size can be specified.The direction of the decision result image is disposed such that acharacter string or the like of the decision result and the print imageare in the same direction.

Next, the print position calculating section 175C calculates thecoordinates under the above-described condition (3) such that therectangular region of the print size is disposed at a positioncorresponding to the color patch CP. With respect to the position of therectangular region (decision result print position), the positionrelationship with respect to the color patch CP and the distance fromthe color patch CP are defined. When the rectangular region is disposednearby the color patch CP in the X direction, it is disposed so as to bealigned with the color patch CP in the Y direction. As shown in FIG.21A, when two columns of color patches CP are printed, the position ofthe rectangular region in the Y direction is decided such that thecenter of the rectangular region in the Y direction is aligned with thecenter of the two columns in the Y direction. When the rectangularregion is disposed nearby the color patch CP in the Y direction, whilethe X and Y directions are inverted, the position of the rectangularregion in the X direction is decided by calculation based on the sameconcept.

In this way, if the position in a direction perpendicular to a directionin which the rectangular region is disposed nearby the color patch CP isdecided, next, the position in the direction in which the rectangularregion is disposed nearby the color patch CP is decided. As describedabove, this position is decided on the basis of the distance from thecolor patch CP. This distance is set individually in accordance with thedirection (in FIG. 21A, the left-right direction or the up-downdirection) in which the rectangular region is disposed nearby the colorpatch CP. For example, let the distance from the color patch CP when therectangular region is disposed nearby the color patch CP in theleft-right direction be ΔQx, then, the position of the rectangularregion in the X direction is set to a position spaced at the distanceΔQx from the print region of the color patch CP in the X direction.

Let the coordinates of the print region of the color patch CP be(xcp1,ycp1) and (xcp2,ycp2), then, the print position calculatingsection 175C calculates the coordinates of the rectangular region on theimmediate right side of the color patch CP as (xcp2+ΔQx,ycp1),(xcp2+ΔQx,(ycp1+ycp2+Ly)/2), and (xcp2+ΔQx+Lx,(ycp1+ycp2−Ly)/2). Theposition relationship of the rectangular region with respect to thecolor patch CP may be appropriately set. Thus, calculation according tothe position relationship to be used may be performed in the samemanner.

The second printer driver 89 of this embodiment is provided with thesame image data processing section as the printer driver, and performsthe image processing (resolution conversion, color conversion,halftoning, or the like) for label image data received from the firstprinter driver 151 to generates label print data on the CMYK colorsystem. In this case, resolution conversion and magnification areperformed such that the label print image has the rectangular regionsize. Of course, decision result characters may be substituted for thedecision result image. In this case, the second printer driver 89converts character data (ASCII code or the like) of the decision resultcharacters into print data that can be printed with a predeterminedsize. After the position and size of label print are calculated, thevalues (label print position information) may be sent to the firstprinter driver 151 of the host apparatus 150. The first printer driver151 may perform an image processing by using the values to generateprint data for label print, and may transmit print data to the printer10.

In this way, the second printer driver 89 generates label print data LPDshown in FIG. 21B corresponding to print image data PGD for colormeasurement shown in FIG. 21A, which has already been printed. As shownin FIG. 21B, label print data LPD becomes print data in which the printposition of the decision result image JG is set to a positioncorresponding to the blank space region nearby the color patch CP inprint image data PGD for color measurement and a position at a regulardistance from the color patch CP. Under the above-described condition(2), the rectangular region size (decision result print size) isadjusted according to the paper size. Alternatively, the rectangularregion size may be adjusted according to the print size of the colorpatch CP.

Returning to FIG. 16, the ink consumption arithmetic section 176calculates ink consumption (cumulative ink consumption). The headcontrol section 113 has a dot counter (not shown) that counts the numberof ink dots to be ejected from the nozzles of the recording head 19 onthe basis of raster data acquired from the image buffer 102. The headcontrol section 113 calculates ink consumption on the basis of the countvalue of the dot counter, and adds calculated ink consumption toprevious cumulative ink consumption to calculate current cumulative inkconsumption.

The paper consumption count section 177 counts paper consumption (thenumber of consumed sheets or consumed paper length). For example, theconsumed length of the roll paper R due to printing is counted on thebasis of the count value of the counter 115A (described below) thatcounts the value corresponding to the transport length of the roll paperR from the front end. In the case of single sheets of paper, the paperconsumption count section 177 counts the number of sheets fed from thesheet cassette (not shown) by using a counter (not shown).

When the remote mode transition code MR is present, the commandanalyzing section 101 changes the operation mode to the remote mode,analyzes the remote command RC to be analyzed, and sends the analyzedremote command RC to the second printer driver 89. For this reason, inthe remote mode, the paper feed control command PFC1, the windingcontrol command WCC1, the color measurement driving control commandCMDC, the color measurement control command CMC, the label print commandLPC, the job information storage command JMC, color measurementassociated data CMD, and the like are sent to the second printer driver89. While the remote command is being analyzed, if the color measurementmode transition code “CM” is present, the operation mode is changed tothe color measurement mode. In this case, only the color measurementdriving control command CMDC and the color measurement control commandCMC are to be analyzed.

The second printer driver 89 generates a new command on the basis of theremote command, and transmits the new command in a print data format tocontrol the color meter 41, the color measurement driving device 80, andthe winding device 30. The value of the remote command generated by thefirst printer driver 151 is specified by the logical coordinate system.For example, the value “Y” of the paper feed command “PF(Y)” isspecified as the value of the logical coordinate system on the papercalculated by the logical coordinate calculating section 159. Therefore,even if the roll paper R is misaligned from the reference position onthe printer 10, the second printer driver 89 generates a commandspecified by a value converted from the logical coordinate system to thereal coordinate system, such that recording or color measurement can beaccurately performed at a corresponding position represented by thelogical coordinates on the roll paper R.

The logical coordinate is an ideal coordinate system on an assumptionthat the roll paper R is not misaligned in the transport direction A andthe paper width direction. The logical coordinate is a coordinate systemin which the recording position or the color measurement position of thecolor patch CP is represented by coordinates with a predeterminedposition (in this example, the upper left corner of each page) of theroll paper R as the origin (0,0) (see FIG. 17).

In contrast, the real coordinate is a coordinate system on an assumptionthat the roll paper R is slightly misaligned in the transport directionA and the paper width direction, in which the recording position or thecolor measurement position of the color patch CP is represented with aseparate position (reference position) from the roll paper R as theorigin. Accordingly, in the real coordinate system, the coordinate valueis obtained in consideration of the misalignment amount of the rollpaper R. For this reason, if a command specifying the value of the realcoordinate system is generated, position control of an object to becontrolled (for example, the roll paper R, the color measurementcarriage 57, the color meter 41, or the like) is possible so as to beaccurately positioned at the real recording position or colormeasurement position, regardless of misalignment of the roll paper R. Inthis embodiment, with respect to the origin of the real coordinatesystem, as shown in FIG. 10A, the front end of the roll paper R reachesthe set reference position of the recording head 19 (for example, theuppermost nozzle position) is used as the origin “0” in the transportdirection A. The home position (see FIG. 11) of the color measurementcarriage 57 (or the color meter 41) is used as the origin in the mainscanning direction B (paper width direction).

Conversion from the value of the logical coordinate system to the valueof the real coordinate system is performed by using the measurementvalue of the position of the roll paper R in the transport direction Aand the measurement value of the position of the roll paper R in themain scanning direction B (paper width direction). For this reason, inthe printer 10 of this embodiment, paper position information concerningthe positions of the roll paper R in the transport direction A and themain scanning direction B (paper width direction) is measured.

Next, a method of acquiring position information of the roll paper R,which is used when a command of the real coordinate system is generated,will be described. In this embodiment, as the position information ofthe roll paper R, the position of the roll paper R in the transportdirection A, the position of the roll paper R in the main scanningdirection B (misalignment amount), and the misalignment amount in themain scanning direction B due to skewed movement of the roll paper R atthe position of the color meter 41 on the downstream side in thetransport direction from the detection position with respect to theposition of the roll paper R in the main scanning direction B arecalculated.

First, the position of the roll paper R in the transport direction A ismeasured by using the paper detection sensor 110, the encoder 109, and acounter 115A in the paper feed control section 115. The encoder 109shown in FIG. 16 detects rotation of the PF motor 108 and outputs anencoder signal having pulses proportional to the rotation amount. Theencoder 109 detects, for example, rotation of the rotary shaft of thegear wheel train on a power transmission path of the PF motor 108,thereby indirectly detecting the rotation of the PF motor 108. The paperdetection sensor 110 is located at a predetermined position on thetransport path of the roll paper R, and detects the front end of theroll paper R while the roll paper R is being fed.

Next, the processing to be executed by the second printer driver 89shown in FIG. 16 is the same as the first embodiment. In thisembodiment, as the result of analysis by the remote command analyzingsection 116, the paper feed control commands PFC1 to PFC3, the windingcontrol commands WCC1 to WCC3, the color measurement driving controlcommand CMDC, and the like are analyzed as commands, which requireconversion from the value of the logical coordinate system to the valueof the real coordinate system. The command generating section 117 andthe coordinate calculating section 118 incorporate the values (colormeasurement position or drive amount) of the real coordinate system thatare obtained by converting the values of the logical coordinate systemin the commands, which require coordinate conversion, into the values ofthe real coordinate system, as the values of the commands, therebygenerating the control commands for the paper feed system, the colormeasurement system, and winding system.

As described above, in this embodiment, similarly to the firstembodiment, the recording positions of the print image IG and the colorpatch CP are set to the print positions of the real coordinate systemwith the misalignment of the roll paper R in the paper width directionadded. Therefore, the coordinates of the print image IG and the colorpatch CP that are used to decide the coordinate of the decision resultimage JG are stored in the RAM 173 as the coordinates of the realcoordinate system.

Next, the processing of the printer system 100 will be described withreference to flowcharts of FIGS. 23 and 24 and a transaction diagram ofFIG. 25. The flowcharts are not limited to a processing by software, andthey may include a processing by hardware.

The user may operate the input device 162 of the host apparatus 150 toexecute normal printing in which the image displayed on the monitor 150a is printed, or to specify the color patch on the setup screen forcolor measurement, thereby executing printing for color measurement.When printing for color measurement is executed, an image for colormeasurement is printed, and subsequently color measurement is performedfor the color patch CP. When the user wants to perform label print ofthe decision result by the first printer driver 151 based on colormeasurement data acquired by the color meter 41, he/she operates thelabel print setup button 141 on the setup screen 140 for colormeasurement shown in FIG. 17 to execute printing for color measurement.

When printing is executed, the host apparatus 150 (specifically, thefirst printer driver 151) establishes communication with the printer 10.If communication is established, first, the host apparatus 150 transmitsthe job start command “JS” to the printer 10 (S210) (job start step).When receiving the job start command “JS” (S410), the printer 10inhibits an interrupt from a host apparatus different from the hostapparatus 150 on the network until the job end command “JE” is receivedfrom the host apparatus 150. Therefore, even if an interrupt request isinput from a different host apparatus, the printer 10 does not acceptthe request.

Next, print data is sent from the host apparatus 150 to the printer 10,and printing is instructed (S220) (first command step). For example,print data for color measurement to print the print image IG and thecolor patch CP is transmitted. The printer 10 prints the print image IGand the color patch CP on the roll paper R on the basis of print data(S420). At this moment, the host apparatus 150 confirms the printprogress situation in the printer 10, and if a response concerning theend of printing is sent from the printer 10 (in S230, Yes), next, it isdetermined whether or not there is color measurement to be executed bythe color measuring device 40 (that is, whether or not the userspecifies color measurement on the setup screen for color measurementand instructs to execute printing) (S240) (determination step).

If there is color measurement to be executed by the color measuringdevice 40 (in S240, Yes), next, the host apparatus 150 instructs colormeasurement (S250) (second command step). When the color measurementinstruction is accepted from the host apparatus 150 (in S430, Yes), theprinter 10 transmits received color measurement instruction data to thecolor meter 41 to instruct the color meter 41 to perform settings(S440). As a result, the color meter 41 performs initialization orsetting of the color measurement condition.

Next, the printer 10 performs color measurement (S450). That is, theprinter 10 drives the PF motor 108 to position the roll paper R at thecolor measurement position in the transport direction A. Thereafter, theprinter 10 instructs the color measurement driving device 80 to push theroll paper R. As a result, the paper push motor 71 is driven to rotateforward such that the roll paper R disposed at the color measurementposition is pressed by the press member 44 (see FIGS. 3 and 11). Next,the printer 10 instructs the color measurement carriage 57 to positionin the column direction C (the main scanning direction B). As a result,the color measurement carriage 57 moves at a constant speed in the mainscanning direction B (for example, an example of scan colormeasurement). In this case, the printer 10 (specifically, the secondprinter driver 89) sequentially receives position information of thecolor measurement carriage 57, which is counted by the counter 125A onthe basis of the output signal from the encoder 130 of the colormeasurement driving device 80, from the color measurement driving device80. In addition, in synchronization with the movement of the colormeasurement carriage 57, the printer 10 instructs the color meter 41 toacquire color measurement data each time the color meter 41 reaches aposition where color measurement can be performed for the center of theunit patch D. The color meter 41 stores color measurement data in thebuffer on the basis of the instruction to acquire data at the timing atwhich the color meter 41 reaches a position where color measurement canbe performed for the center of the unit patch D. If color measurementends for one column of color patch CP in such a manner, the colormeasurement carriage 57 is moved to the home position. If the colormeasurement carriage 57 returns to the home position, the paper pushmotor 71 is driven to rotate backward to release the roll paper R of thepress member 44.

Next, if there is a color patch CP that is subject to color measurement,the roll paper R is transported to the next color measurement position.Hereinafter, when a plurality of columns of color patches CP arepresent, the same processing is repeatedly performed until colormeasurement ends for all of the color patches CP.

At this moment, the host apparatus 150 sequentially transmits the colormeasurement progress request to the printer 10 and determines whether ornot color measurement ends (S260). The printer 10 monitors the end ofcolor measurement of the color measurement driving device 80 (endstatus), and if a response concerning the end of color measurement isaccepted, transmits the response concerning the end of color measurementto the host apparatus 150 (S460). If the end of color measurement isnotified (in S260, Yes), the host apparatus 150 requests the printer 10to send the color measurement result (S270). The printer 10 that acceptsthe color measurement result request sends the color measurement resultrequest to the color meter 41. The color meter 41 that accepts the colormeasurement result request sends the color measurement result (colormeasurement data) to the host apparatus 150 through the printer 10. Ifcolor measurement data is accepted, the host apparatus 150(specifically, the deciding section 158) decides pertinence of a printcolor on the basis of color measurement data (S290). It is decidedwhether or not the decision result is “OK” (S300), and if the decisionresult is “OK” (in S100, Yes), the host apparatus 150 (specifically, thedetermining section 183 shown in FIG. 19) determines whether or notthere is label print (S310). If the result is determined to be “OK”, thehost apparatus 150 (specifically, the label print command section 182Ashown in FIG. 19) instructs label print (S410). With respect to thelabel print instruction, the commands for the paper feed system, thecommands for the label print system, and label print data LPD aretransmitted to the printer 10. The host apparatus 150 (specifically, thejob information generating section 185 shown in FIG. 19) generates colormeasurement associated data (data including job information concerningcolor measurement, such as color measurement frequency, colormeasurement condition, decision result, and the like) to be stored inthe printer 10 as job information on the basis of acquired colormeasurement data and the decision result of the deciding section 158,and temporarily stores color measurement associated data in the datastorage section 157.

The printer 10 that accepts the label print instruction calculates thelabel print position (S490). That is, the label print positioncalculating section 175 (see FIG. 20) is activated to calculate thelabel print position on the basis of print image data for colormeasurement and label print data LPD acquired from the host apparatus150.

In the label print position calculating section 175, first, the blankspace region detecting section 175A detects the blank space region otherthan the print image IG and the color patch CP from print image data forcolor measurement, and calculates the print size, in which the labelprint image (rectangle) is inscribed, within an area of a predeterminedpercent (%) with respect to an area nearby the color patch CP in each ofthe four directions from the detected blank space region. When aplurality of candidates are present, a blank space region having ahighest arrangement priority is selected. The print position calculatingsection 175C calculates the print position disposed at a predetermineddistance from the color patch CP. In this way, the label print positionis calculated.

If the label print position is decided, the printer 10 positions theroll paper P to the label print position (S500). That is, the printer 10incorporates the label print position into the values of the commandsfor the paper feed system, which are accepted when label print isinstructed, and generates the paper feed command that is used totransport the roll paper R from the color measurement position to thelabel print position. In this case, the roll paper R is fed backward(backward feed) from the color measurement position to the label printposition. Accordingly, the label print position is incorporated into thevalue of the winding control command WCC2 to generate the windingcommand that is required for the backward feed operation. The printer 10drives the PF motor 108 to rotate backward in accordance with the paperfeed command, and sends the winding command to the winding device 30 soas to instruct backward rotation of the winding device 30. Accordingly,the PF motor 108 is driven to rotate backward and the winding device 30is driven to rotate backward in synchronization with backward rotationof the PF motor 108. Thus, the roll paper R is fed backward to the labelprint position (backward feed).

If the roll paper R is disposed at the label print position, next, theprinter 10 performs label print (S510). That is, when label print dataLPD received from the host apparatus 150 (specifically, the firstprinter driver 151) is image data (for example, the RGB color system)for the monitor display system, the printer 10 performs the imageprocessing (resolution conversion, color conversion, halftoning, or thelike) by using the second printer driver 89 to generate label print dataLPD of the CMYK color system (see FIG. 21B). The control section 103drives the print engine 95 on the basis of label print data LPD andexecutes label print of the decision result image JG on the roll paper R(see FIG. 22C).

At this moment, the host apparatus 150 sequentially sends the labelprint progress request to the printer 10 and confirms the end of labelprint (S330). If label print ends, the printer 10 sends a responseconcerning the end of label print to the host apparatus 150.

The host apparatus 150 that confirms the end of label print instructsthe printer 10 to store job information (S340). Specifically, the jobinformation transmitting section 186 shown in FIG. 19 transmits colormeasurement associated data CMD read from the data storage section 157to the printer 10, together with the job information storage command JMC(see FIGS. 18 and 19).

If the job information storage instruction is received (in S530, Yes),the printer 10 stores job information (S540). During printing, in theprinter 10, the ink consumption arithmetic section 176 counts the numberof ink droplets (dots) to be ejected from the recording head 19 on thebasis of print image data by using a dot counter (not shown) for eachpredetermined print unit (for example, for each predetermined number ofrows or for each page), and calculates ink consumption per print unit bymultiplying the count value of the dot counter by the weight (or volume)per dot. The ink consumption arithmetic section 176 adds currentlycalculated ink consumption to previous cumulative ink consumption storedin the RAM 173, thereby updating cumulative ink consumption. Similarly,during printing, the paper consumption count section 177 counts paperconsumption (the number of sheets or paper length) per print unit, andadds current paper consumption to previous cumulative paper consumptionstored in the RAM 173, thereby updating cumulative paper consumption.

The control section 103 of the printer 10 stores updated ink consumptionand paper consumption temporarily stored in the RAM 173 in the jobinformation storage section in the RAM 173, together with colormeasurement associated data. When the printer 10 is powered off, jobinformation stored in the RAM 173 is stored in the job informationstorage section 172 of the nonvolatile memory 171, and when the printer10 is power on again, job information is read out from the jobinformation storage section 172 and written in the job informationstorage section of the RAM 173. If the management server 300 accessesthe printer 10 and requests job information, the printer 10 transmitsjob information stored in the job information storage section of the RAM173 or the nonvolatile memory 171 to the management server 300. The jobinformation may be rewritten in the job information storage section 172of the nonvolatile memory 171 each time the job information is updatedor for each predetermined number of times of update.

If it is confirmed that job information storage ends, the host apparatus150 instructs the printer 10 to position the roll paper R in order totransport the roll paper R to a predetermined position (S350). Theprinter 10 that receives the instruction to position the roll paper Rpositions the roll paper R (S550). In this example, the predeterminedposition is the print start position of the next page, and the hostapparatus 150 transmits the paper feed control command PFC3, which isused to feed backward the roll paper R to the print start position ofthe next page (backward feed), and the winding control command WCC3,which is used to drive the winding device 30 to rotate backward, to theprinter 10. As a result, the PF motor 108 is driven to rotate backwardto feed backward the roll paper R, and the winding device 30 is drivento rotate backward in synchronization with backward rotation of the PFmotor 108 to unwind the roll paper R from the winding device 30. Thus,the roll paper R is fed backward to the print start position of the nextpage.

When color measurement is executed, if all of the jobs includingprinting for color measurement, color measurement instruction, decision,label print instruction, and job information storage instruction end,the host apparatus 150 transmits the job end command “JE” to the printer10 (S360) (job end notification step). The printer 10 receives the jobend command “JE” (S560). If the job end command “JE” is received, theprinter 10 disconnects communication with the host apparatus 150, andpermits an interrupt from a different host apparatus. That is, theprinter 10 accepts a communication connection request from a differenthost apparatus.

Although in the above description, as shown in shown in FIG. 25, anexample where color measurement is executed has been described, duringnormal printing, there is no color measurement to be executed subsequentto printing (in S240, No). Accordingly, after printing ends, the hostapparatus 150 instructs the printer 10 to store job information and toposition the roll paper R, and transmits the job end command “JE” to theprinter 10 (S360). When color measurement is executed, if the result isdetermined to be “NG”, after color measurement decision, the hostapparatus 150 instructs the printer 10 to store job information and toposition the roll paper R, and transmits the job end command “JE” to theprinter 10 (S360). Even if the result is determined to be “OK”, whenthere is no label print, after color measurement decision, the hostapparatus 150 instructs the printer 10 to store job information and toposition the roll paper R, and transmit the job end command “JE” to theprinter 10 (S360).

As described above in detail, according to this embodiment, thefollowing effects are obtained.

(1) After it waits until color measurement data is received, the job endcommand “JE” is transmitted to the printer 10. For this reason, if colormeasurement data is received, color measurement can be rapidlyperformed. For example, if the job end command “JE” is transmitted onceafter printing for color measurement ends, an interrupt is accepted froma different host apparatus or the like, and accordingly colormeasurement data cannot be received until the interrupt ends. In thiscase, the user waits for a long time until the color measurementdecision result is displayed on the monitor 150 a of the host apparatus150. For example, the user feels uneasy about a failure in colormeasurement. After color measurement ends, it takes a lot of time untilcolor measurement associated data is updated. Accordingly, when themanagement server 300 accesses the printer 10 so as to acquire jobinformation, even if color measurement ends, color measurementassociated information is not updated, and only old color measurementassociated information is acquired. With the configuration of thisembodiment, the above problems can be resolved.

(2) After it waits until label print ends, the job end command “JE” istransmitted to the printer 10. For this reason, after color measurementends, label print can be rapidly performed. For example, if the job endcommand “JE” is transmitted once after color measurement, an interruptis accepted from a different host apparatus or the like, and accordinglylabel print cannot be performed until the interrupt ends. In this case,the user feels uneasy about a print error during label print. With theconfiguration of this embodiment, the above problems can be resolved.

(3) After it waits until the job information storage instruction ends,the job end command “JE” is transmitted to the printer 10. For thisreason, after color measurement ends, color measurement associated datacan be rapidly updated. For example, if the job end command “JE” istransmitted once after color measurement and before the job informationstorage instruction, an interrupt is accepted from a different hostapparatus or the like, and accordingly the job information storageinstruction cannot be performed until the interrupt ends. In this case,when the management server 300 accesses the printer 10 so as to acquirejob information, even if color measurement ends, color measurementassociated information is not updated, and only old color measurementassociated information is acquired. With the configuration of thisembodiment, the above problems can be resolved.

(4) After printing ends and it waits until the paper positioninginstruction to place the paper at a predetermined position ends, the jobend command “JE” is transmitted to the printer 10. For this reason,after printing ends, the paper can be rapidly positioned at a nextpredetermined position. For example, if the job end command “JE” istransmitted once after printing end and before the paper positioninginstruction, an interrupt is accepted from a different host apparatus orthe like, and accordingly the paper positioning instruction cannot beperformed until the interrupt ends. In this case, when a next pagestarts to be printed, it takes a lot of time and labor to transport thepaper to the print start position, and printing start is delayed. Whenthe paper is cut, paper cutting is delayed, and the user waits until thepaper is cut. With the configuration of this embodiment, the aboveproblems can be resolved.

(5) The printer 10 calculate the label print position. Therefore, labelprint of the decision result image JG can be performed at an appropriateposition corresponding to the color patch CP printed on the paper. Theuser does not need to operate the input device 162 to specify the labelprint position.

(6) The blank space region in the paper area (or the print area) isdetected, and the label print position is set within the detected blankspace region. Therefore, the decision result image JG can be preventedfrom being printed on the print image IG or the color patch CP in anoverlap manner. As a result, even if the print position is automaticallydecided and printing is performed, the decision result image JG can beprevented from being printed on the print image IG or color patch CP inan overlap manner to be unreadable.

(7) The label print position is automatically set to a correspondingposition spaced at a predetermined distance from the color patch CP, andthe decision result image JG is printed at the label print position.Therefore, when a plurality of print images IG and color patches CP areprinted on the paper, the color patch CP and the corresponding decisionresult image JG can be distinguished at a glance.

(8) The print image IG and the color patch CP are printed at thepositions of the real coordinate system with the misalignment amount ofthe roll paper R added, and the label print position is calculated byusing the print position of the color patch CP represented by the realcoordinate system. Therefore, the distance between the label printposition and the color patch CP can be prevented from being changed dueto the misalignment amount of the roll paper R.

(9) The misalignment amount of the roll paper R from the referenceposition in the paper width direction is detected from the detectionresult of the paper width sensor 111. The value of the logicalcoordinate system is converted into the value of the real coordinatesystem with the misalignment amount added. The operation position of thecolor measurement carriage 57 is controlled on the basis of a command inwhich the value of the real coordinate system is incorporated.Therefore, even if the roll paper R is misaligned in the paper widthdirection, color measurement can be accurately performed for the colorpatch CP at an appropriate color measurement position. As a result,accuracy of the color measurement decision result can be improved.

The invention is not limited to the embodiments, and it may be changedor modified as follows.

(Modification 1) In the foregoing embodiments, the color measurementcontrol command is generated by the host apparatus and transmitted tothe printer together with print data. Alternatively, the printer mayinternally generate the color measurement control command on the basisof a color measurement condition input by an operation of an operationpanel.

(Modification 2) The printer 10 is not necessarily connected to the hostapparatus. For example, the printer may be provided with a printerdriver that generates print data from image data (for example, RGB imagedata), and the printer driver in the printer may generate and acquirefirst control data. A color measurement driver in the printer maygenerate the color measurement control command on the basis of a colormeasurement condition input from the operation panel of the printer. Inthis case, an option device may be set to declare (respond) that itbelong to a printer class. When this happens, the USB host 81A of theprinter 10 may establish communication with the USB devices 82A and 84Aof the color measurement driving device 80 and the winding device 30.Print data generated by the second printer driver 89 can be transmittedfrom the printer to the color measurement driving device 80 and thewinding device 30 serving as optional devices. Therefore, the colormeasurement driving device 80 and the winding device 30 can becontrolled by using a command for printing. For this reason, the motorcontrol function for a printer of the existing printer driver can beused, and thus it is not necessary to develop an exclusive-use driverfor driving the color measurement driving device 80 and the windingdevice 30. As a result, costs and time for driver development can bereduced.

(Modification 3) In calculating the value of the real coordinate system,the misalignment amount may not be corrected. For example, a sensor (inthe foregoing embodiments, the paper width sensor 111) that calculatesthe misalignment amount of the roll paper R may not be provided. Whenthe misalignment amount in the paper width direction is corrected, forexample, the misalignment amount of the paper width direction may beinput from an input operation section of the printer 10, and the valueof the real coordinate system may be calculated by using themisalignment amount.

(Modification 4) The sub-device may be only the winding device 30 or maybe only the color measuring device 40.

(Modification 5) The sub-device (second processing section) is notlimited to the optional device, such as the winding device 30 or thecolor measuring device 40. The sub-device (optional device) may be adecision device (print image inspection device) that captures the printresult by a camera, performs an image processing for the captured image,and decides the print result, a nozzle inspection device that inspectsclogging of the nozzles of the recording head 19, or a drying devicethat dries ink on the target after printing.

(Modification 6) The specific class is not limited to the print command.For example, if the first device is a device different from a printer, astandard command that is used in the first device as the standard may beused.

(Modification 7) In the foregoing embodiments, the invention is appliedto an ink jet recording type serial printer that is an example of theprinter serving as the first device (first processing section).Alternatively, the invention may be applied to an ink jet recording typeline printer.

(Modification 8) In the foregoing embodiments, the color meter isdisposed on the downstream side in the transport direction from therecording head, but the position of the second device is not limitedthereto. For example, the second device may be disposed on the upstreamside in the transport direction with respect to the recording head. Inthis case, the direction of misalignment in the paper width directiondue to skewed movement of the target is inverted with respect to theembodiments.

(Modification 9) In the foregoing embodiments, a position includingmisalignment in a first direction (for example, the main scanningdirection B (paper width direction)) intersecting the transportdirection of the target and misalignment in the first direction due toskewed movement of the target is detected. Alternatively, a positionincluding only one misalignment may be detected.

(Modification 10) The second device (second processing section) is notlimited to the color measuring device. The second device may be ameasuring device that measures matters other than the color of anobject. For example, brightness may be measured. Matters, such as dotshift or the like, which are used to decide the print result may bemeasured. An object to be measured is not limited to a printed object.

(Modification 11) The first device (first processing section) is notlimited to the printer that performs recording (printing) as aprocessing for the target. The processing of the first device for thetarget may be, for example, etching or laser processing for a substrateas a target. In this case, a processing of the second device (secondprocessing section) may be a second processing at a position overlappinga processing position of the first device or at a position satisfying apredetermined position relationship with respect to the processingposition of the first device, measurement of processing by the firstdevice (measurement of processing accuracy or the like), or the like.The first device may detect a position on the target where the seconddevice appropriately performs a processing, and the second device mayperform the processing at the position detected by the first device.

(Modification 12) In the foregoing embodiments, the detection unit isprovided in the printer serving as the first device, but the detectionunit may be provided in the second device. In this case, the detectionresult of the detection unit is transmitted from the second device tothe first device, and the control data generation unit of the firstdevice generates second control data, which is specified by a conversionvalue from a first coordinate system to a second coordinate system, onthe basis of the received detection result.

(Modification 13) In the foregoing embodiments, the misalignment amountΔx is stored in the memory 102 and coordinate conversion is performed byusing the misalignment amount Δx, but the invention is not limitedthereto. For example, the recording positions of the unit patches Dconstituting the color patch CP serving as an object may be stored, andthe operation position of the color measurement carriage 57 serving as amobile may be decided so as to be adjusted to the stored recordingposition of the unit patch. In this case, with respect to the recordingposition of the unit patch D, the recording position that is calculatedon the basis of the count value of the counter 114A, which representsthe position of the carriage 17 when the unit patch is printed, may bestored. A position on the target (roll paper R) where an ink droplet islanded from an ink ejection position of the recording head 19 iscalculated by using a carriage speed and an ink flight speed (storedexperimental value), and a distance between the recording head 19 andthe target. The recording position of the unit patch is set to aposition on the paper with the misalignment amount of the roll paper Rin the paper width direction corrected on the basis of the detectionunit of the paper width sensor 111 serving as a detection unit. Thecarriage position coordinate calculating section 118B (operationposition decision unit) of the second printer driver 89 calculates aposition, at which the position (specifically, the center position) ofthe unit patch D from the memory 102 serving as a storage unit isaligned with the color measuring section 123, as the operation positionof the color measurement carriage 57.

(Modification 14) In the foregoing embodiments, the color meter isdisposed on the downstream side in the transport direction from therecording head, but the position of the second device is not limitedthereto. For example, the second device may be disposed on the upstreamside in the transport direction with respect to the recording head. Inthis case, the direction of misalignment in the paper width directiondue to skewed movement of the target is inverted with respect to theembodiments.

(Modification 15) In the foregoing embodiments, a position includingmisalignment in a first direction (for example, the main scanningdirection B (paper width direction)) intersecting the transportdirection of the target and misalignment in the first direction due toskewed movement of the target is detected. Alternatively, a positionincluding only one misalignment may be detected.

(Modification 16) The second device is not limited to the colormeasuring device. The second device may be a measuring device thatmeasures matters other than the color of an object. For example,brightness may be measured. Matters, such as dot shift or the like,which are used to decide the print result may be measured. An object tobe measured is not limited to a printed object.

(Modification 17) The first device is not limited to the printer thatperforms recording (printing) as a processing for the target. Theprocessing of the first device for the target may be, for example,etching or laser processing for a substrate as a target. In this case, aprocessing of the second device may be a second processing at a positionoverlapping a processing position of the first device or at a positionsatisfying a predetermined position relationship with respect to theprocessing position of the first device, measurement of processing bythe first device (measurement of processing accuracy or the like), orthe like. The first device may detect a position on the target where thesecond device appropriately performs a processing, and the second devicemay perform the processing at the position detected by the first device.

(Modification 18) In the foregoing embodiments, the detection unit isprovided in the printer serving as the first device, but the detectionunit may be provided in the second device. In this case, the detectionresult of the detection unit is transmitted from the second device tothe first device, and the control data generation unit of the firstdevice generates second control data, which is specified by a conversionvalue from a first coordinate system to a second coordinate system, onthe basis of the received detection result.

(Modification 19) The invention is not limited to the configuration inwhich the command is transmitted from the printer 10 to the colormeasurement driving device 80 by using print data (ESC/P control data).The command that is used to control the operation position of the seconddevice may be transmitted from the first device to the second devicethrough communication using a different communication protocol.

(Modification 20) In the second embodiment, at least one of label print,job information storage instruction, and paper positioning instructionafter label print may be disused. In this case, after color measurementdata is received, the job end command “JE” is transmitted to the printer10. Therefore, after at least printing for color measurement ends, colormeasurement data can be rapidly acquired. As a result, the substantiallysame effects as the foregoing embodiments can be obtained.

(Modification 21) In the second embodiment, the host control section isnot limited to the printer driver 151 (host driver) in the hostapparatus 150. For example, a printer driver that is provided in theprinter 10 and functions as the host control section may be used. Forexample, a printer driver of a standalone type printer in which the usercan operate an operating button to specify the color measurementcondition or color patch CP and label print while viewing a setup screenfor color measurement displayed on a screen of an operation panel of theprinter 10 may be used. In this case, the printer driver in the printer10 basically has the same configuration as the printer driver 151 shownin FIG. 5 and has a function to execute image processing, colormeasurement condition setup, label print setup, job information storageinstruction, and the like. With this configuration, the notificationtiming of the job start command JS and the job end command JE to theprinter 10 is identical to the timing in the first embodiment. As aresult, after printing ends, it is possible to suppress a delay untilcolor measurement data acquisition, label print, job information storageinstruction, or paper positioning is actually executed.

(Modification 21) In the second embodiment, the user may operate theinput device 162 on the setup screen 140 for color measurement tospecify the label print position, and an image processing for printingmay be performed on label print data (for example, RGB image data) suchthat the printer driver 151 can print at the specified position, therebygenerating label print data for printing (CMYK color system image data).That is, after the deciding section 158 decides the color measurementresult on the basis of color measurement data, the image data processingsection 161 reads out label print data, which is specified by the userthrough the setup screen for color measurement, from the data storagesection 157, and performs an image processing for label print data so asto be printed at the specified position with the specified size togenerate label print data of the CMYK color system.

(Modification 22) In the second embodiment, the value of the command maynot be converted from the logical coordinate system to the realcoordinate system.

(Modification 23) The first processing unit is not limited to theprinter. For example, a device may be used that includes a transportunit transporting a target, and a reading unit reading a portion to beread, such as a predetermined mark or an image, which is specified bythe host apparatus, from the target being transported.

(Modification 24) In the foregoing embodiments, an ink jet type printer10, which is an example of a fluid ejecting apparatus, is used as thefirst device (or first processing section), but the invention is notlimited thereto. A fluid ejecting apparatus that ejects a fluid (aliquid, a liquid-state material in which particles of a functionalmaterial are dispersed in or mixed with a liquid, a fluid-statematerial, such as gel, or a solid which can flow and be ejected as afluid) other than ink may be used. For example, a liquid-state materialejecting apparatus that ejects a liquid-state material having dispersedor dissolved a material, such as an electrode material or a colormaterial (pixel material), which is used for manufacturing a liquidcrystal display, an EL (Electroluminescence) display, and a fieldemission display, a liquid ejecting apparatus that ejects a bio-organicmaterial, which is used for manufacturing a bio-chip, or a liquidejecting apparatus that ejects a liquid as a sample, which is used as aprecision pipette, may be used. A liquid ejecting apparatus thatpinpoint ejects a lubricant to precision instrument, such as a watch ora camera, a liquid ejecting apparatus that ejects a transparent resinliquid, such as ultraviolet curable resin, on a substrate to form a finehemispheric lens (optical lens) for an optical communication element orthe like, a liquid ejecting apparatus that ejects an etchant, such asacid or alkali, to etch a substrate or the like, a fluid-state materialejecting apparatus that ejects a fluid-state material, such as gel (forexample, physical gel), or a particulate ejecting apparatus (forexample, a toner jet type recording apparatus) that ejects a solid, forexample, powder (particulate), such as toner or the like, may be used.The invention may be applied to one of the liquid ejecting apparatuses.In the specification, the term “fluid” is a concept that does notinclude a fluid, which consists of only gas. Examples of the fluidinclude, for example, a liquid (including an inorganic solvent, anorganic solvent, a solution, liquid-state resin, a liquid-state metal(metal melt), and the like), a liquid-state material, a fluid-statematerial, a particulate (including a granular material and powder), andthe like. The substrate, the precision instrument, or the like serves asthe target.

1. An electronic device system comprising: a first device that belongsto a first class and executes a first processing; and a second devicethat belongs to a second class, which is different from the first class,and executes a second processing, wherein the first device includes adata acquiring unit acquiring a first command in a specific data format,which is being analyzable by the device of the first class, a firstcontrol unit executing the first processing on the basis of the firstcommand, a device driver having a command generating unit, whichconverts a parameter in the first command to generate a second commandto be transmitted to the second device, a first analyzing unit analyzingthe first command and transmitting the first command to the firstcontrol unit or the device driver, and a host communication sectiontransmitting the second command including the converted parameter to thesecond device on the basis of a response signal from the second deviceindicating that the second device belongs to the first class even thoughthe second device does not belong to the first class, and the seconddevice includes a device communication section in which the first classis set as a class to be indicated in the response signal to the firstdevice even though the second device does not belong to the first class,a second analyzing unit analyzing the second command including theconverted parameter, and a second control unit executing the secondprocessing on the basis of the second command including the convertedparameter, wherein the first device is a printer, and the second deviceis different from a printer, and wherein the first class is a printerclass, and the second class is different from printer class.
 2. Theelectronic device system according to claim 1, wherein the first deviceincludes a recording unit recording on a target, the second device is ameasuring device that operates a mobile carriage to measure a positionon the target recorded by the recording unit, the host communicationsection of the printer transmits the second command including theconverted parameter to the measuring device, and the second control unitmoves the mobile carriage on the basis of the parameter.
 3. Theelectronic device system according to claim 2, wherein the printer andthe measuring device are connected to each other by a USB interface, andthe printer is a USB device of the printer class, the measuring deviceis a USB device of the second class, which is an HID class, and thefirst device and the second device perform packet communication.
 4. Theelectronic device system according to claim 3, wherein the printer iscommunicable with a host apparatus, the second command transmitted fromthe host apparatus includes a value of a logical coordinate system seton the target, and the command generating unit converts the value of thelogical coordinate system into a value of a real coordinate system andspecifies the value of the real coordinate system to generate the secondcommand, and the device driver generates the second command includingthe value of the real coordinate system.
 5. A control method of anelectronic device system, the electronic device system including a firstdevice that belongs to a first class and executes a first processing,and a second device that belongs to a second claims and executes asecond processing, wherein the first device acquires a first command ina specific data format, which is being analyzable by the first device ofthe first class, executes the first processing on the basis of ananalysis result of the first command or converts a parameter in thefirst command to generate a second command to be transmitted to thesecond device, and transmits the second command including the convertedparameter on the basis of a response signal indicating that the seconddevice belongs to the first class even though the second device does notbelong to the first class, and the second device transmits the firstclass to the first device as a class in the response signal to the firstdevice even though the second device does not belong to the first class,and executes the second processing on the basis of the received secondcommand including the converted parameter, wherein the first device is aprinter, and the second device is different from the printer, andwherein the first class is a printer class, and the second class isdifferent from the printer class.